xquery version "1.0-ml";
import module namespace
search = "http://marklogic.com/appservices/search"
at "/MarkLogic/appservices/search/search.xqy";
let $options :=
<options xmlns="http://marklogic.com/appservices/search">
<constraint name="city">
<value>
<element name="city"/>
</value>
</constraint>
<sort-order type="xs:string" collation="http://marklogic.com/collation/"
direction="ascending">
<element ns="" name="userName"/>
</sort-order>
</options>
return search:search("city : Atlanta", $options)
when i am executing above query on qconsole with city : Atlanta i am getting correct matched documents details (ie 2 match) but when i am doing city NE Atlanta using above query i am getting wrong result...it means getting all the Documents Available in ML.
My Requirement is when is when i pass city NE Atlanta it should show zero match instead of showing all documents from ML.
Also i don't want to create Range index for city, because this field may changes at runtime.
Please Correct me if i am wrong.