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>
<collection>'/mycollection'</collection>
</constraint>
</options>
let $options-1 :=
<options xmlns="http://marklogic.com/appservices/search">
<constraint name="collection">
<collection prefix="/mycollection"/>
</constraint>
</options>
return
search:search('Text',$options)
I tried both the options, but none of this is restricting the search to the particular collection /mycollection.