Hi, I am using search:search API for getting results.
let $options := <options xmlns="http://marklogic.com/appservices/search"> <term> <term-option>punctuation-sensitive</term-option> <term-option>wildcarded</term-option> <term-option>case-insensitive</term-option> </term> <transform-results apply="raw" /> <additional-query> {cts:and-query(( cts:and-query(for $token in fn:tokenize($search, " ") return cts:element-word-query(xs:QName("title"),$token, ("case-insensitive","wildcarded"))), cts:document-query(($Id)))) } </additional-query> </options> let $suggestions := search:search($search, $options) return $suggestions The suggestions are displayed in alphabetical order by default. Now I want to display the results in the following order Query: Rented House Rented House (exact match) Rented House in Delhi (matches from the beginning of the query) Rented House in Bombay Xyz Rented House abc (adjacent matches anywhere) House & Rented (reverse-ordered adjacent) Rented abx xyz House (correct ordered non-adjacent) How can this be achieved? Thanks, Pragya
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
