The open-source project https://github.com/mblakele/xqysp supports nesting. 
With a little extra code you can turn its output into cts:query XML, then feed 
that into search:resolve.

-- Mike

On 4 Dec 2013, at 11:27 , Murray, Gregory <[email protected]> wrote:

> I'm using the Search API, where it's easy enough to set up a word constraint 
> for a given element and then use the key:value syntax to search only the 
> values of that element, like so:
> 
>    <constraint name="title">
>      <word>
>        <element ns="http://example.com/ns"; name="title"/>
>      </word>
>    </constraint>
> 
> Then you can search for title:whatever to find titles containing the word 
> "whatever". This works great, but it's cumbersome for multi-word searches. 
> For example, if I want titles containing both "sound" and "fury", I have to 
> search for this:
> 
>    title:sound title:fury
> 
> It gets worse with situations like this:
> 
>    (title:encyclopedia OR title:dictionary) AND (title:music OR 
> title:musicology)
> 
> Before I dig into trying to customize the search grammar or some such -- is 
> there an easier way to perform a word search while applying the *entire* 
> search expression only to a given element?
> 
> Thanks,
> Greg
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
> 

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

Reply via email to