Hi All,

We have following document

<SUGGESTIONS>
<SUGGESTION>
<PREF-LABEL>computer</PREF-LABEL>
<ALT-LABEL>laptop</ALT-LABEL>
<HIDDEN-LABEL>super computer</HIDDEN-LABEL>
</SUGGESTION>
<SUGGESTION>
<PREF-LABEL>keyboard</PREF-LABEL>
<ALT-LABEL>virtual keyboard</ALT-LABEL>
<HIDDEN-LABEL>wireless keyboard</HIDDEN-LABEL>
</SUGGESTION>
</SUGGESTIONS>

when user searches for any ALT-LABELS or HIDDEN-LABELS we want to show
PREF-LABEL as suggestion for that we have used following query

cts:search(//SUGGESTION, cts:path-range-query(
"/SUGGESTIONS/SUGGESTION/HIDDEN-LABEL", "=" , ("wireless keyboard"),
("collation=http://marklogic.com/collation/en/S1";)), ("unfiltered"))[1 to
2]

When we pass "*filtered*" option to cts:search, it works properly with a
little *performance hit,* but when we pass "*unfiltered*" option it *does
not give correct result *rather it fetches only first result,
We have also added path range index for above path.(also tried with
element-value-query)

Any help would be appreciated :)

-- 

Thanks and regards,

*Jaydip Rananavare*

*M *+91 98 60 07 39 90
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to