Hi,


How to make a constraint(“coll”) mandatory in search:options while
performing search:search



Ex:

       search:search("Book AND coll:abc",<options xmlns="
http://marklogic.com/appservices/search";>

<constraint name="coll">

<collection prefix="xxx"/>

 </constraint>

</options>

                               )

The above query should fetch me the results


      search:search("Book",<options xmlns="
http://marklogic.com/appservices/search";>

<constraint name="coll">

<collection prefix="xxx"/>

 </constraint>

</options>

                               )

This Query should return empty results.


We tried using below code snippet but not working, Please suggest the
soultion.


  <search:term apply="term">

    <default ref="coll"/>

<search:empty apply="no-results" />

</search:term>


Thanks,

Rajesh
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to