Changeset 834 for MDRepository
- Timestamp:
- 11/03/10 09:45:24 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MDRepository/trunk/xquery/cmd-model.xqm
r833 r834 80 80 util:eval(fn:concat("$collection", $sanitized-query, "/ancestor-or-self::CMD")) 81 81 else 82 for $coll in $collections return util:eval(fn:concat("$collection/ft:query(descendant::IsPartOf, <term>", xdb:decode($coll) ,"</term>)/ancestor-or-self::CMD [", $sanitized-query, "]"))82 for $coll in $collections return util:eval(fn:concat("$collection/ft:query(descendant::IsPartOf, <term>", xdb:decode($coll) ,"</term>)/ancestor-or-self::CMD", $sanitized-query)) 83 83 84 84 let $result-count := fn:count($results), … … 89 89 <searchRetrieveResponse> 90 90 <numberOfRecords>{$result-count}</numberOfRecords> 91 <echoedSearchRetrieveRequest>{if ($decoded-query ne $sanitized-query) then concat("Rewritten to ", $sanitized-query) else $xpath-query, $collections, $start-item, $end-item}</echoedSearchRetrieveRequest>91 <echoedSearchRetrieveRequest>{if ($decoded-query ne $sanitized-query) then concat("Rewritten to '", $sanitized-query, "'") else $xpath-query, $collections, $start-item, $end-item}</echoedSearchRetrieveRequest> 92 92 <extraResponseData> 93 93 <returnedRecords>{$seq-count}</returnedRecords> … … 113 113 return 114 114 if ($query = ("//*", "descendant::element()")) then 115 " /descendant-or-self::CMD"115 "" 116 116 else if ($last-segment = ("Title", "Name", "Role", "Genre", "Country", "Continent", "MdSelfLink", "IsPartOf")) then 117 (: concat("ft:query(",:) if ($query eq concat("//", $last-segment)) then concat(" descendant::", $last-segment) else $query(:, ", <regex>.*</regex>)") :)117 (: concat("ft:query(",:) if ($query eq concat("//", $last-segment)) then concat("[descendant::", $last-segment, "]") else concat("[", $query, "]") (:, ", <regex>.*</regex>)") :) 118 118 else $query 119 119 };
Note: See TracChangeset
for help on using the changeset viewer.