Include an additional collection query within your search options rather
than a constraint.  Collection lexicon not needed.

<additional-query>
    {cts:collection-query("specific_collection_name")}
<additional-query>

Bob
----------------------------------------------------------------
Hi,
I am trying to search a value in the specfic collection.But the
following  query resluts comming from other collection document also(
which has different uri) can any one give me suggestion.

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="subject">
       <value>
          <element ns="http://purl.org/dc/elements/1.1/";
name="subject"/>
       </value>
   </constraint>
<constraint name="myCollection">
    <collection prefix="/source/Sciences"/> </constraint>

    </options>
return
 search:search("subject:math",$options)

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

Reply via email to