Hi,

Do you have the collection lexicon enabled for that database?

An alternative approach which doesn't require that is to use:

<searchable-expression>fn:collection('/source/Sciences')</searchable-expression>

cheers
andrew


On 10 February 2010 07:55, Arpitha Chittumalla <[email protected]> wrote:
> 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
>



-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to