Hi Karl,

Danny mentioned another alternative in an earlier response which I think might 
be of interest to you. Searchable expressions allow you to explicitly select 
one subpath within documents, but you could also use element queries. I must 
warn that it will not have the exact same behaviour, but I have the impression 
that it should work for you, and I think it allows you to do your 
grouped-constraints query (just giving the beast some name) in one single 
search, without additional-queries etc.

An element query takes the name of an element and a subquery. This subquery is 
constrained to the descendants of the element. So if you would supply and 
and-query as subquery, all these subqueries would be constrained to that 
element. It would require that the element names to which you want to constrain 
your searches should have some degree of uniqueness in the complete document, 
and shouldn't occur recursively. It would still work in those cases, but 
perhaps not in the way you would like. You can also wrap element queries in 
other element queries, but not that the inner element doesn't need to be the 
child, it can also be a descendant further down the hierarchy..

Hope this helps..

Kind regards,
Geert

>


drs. G.P.H. (Geert) Josten
Consultant


Daidalos BV
Hoekeindsehof 1-4
2665 JZ Bleiswijk

T +31 (0)10 850 1200
F +31 (0)10 850 1199

mailto:[email protected]
http://www.daidalos.nl/

KvK 27164984

P Please consider the environment before printing this mail.
De informatie - verzonden in of met dit e-mailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.

> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> Karl Erisman
> Sent: dinsdag 6 april 2010 23:26
> To: General Mark Logic Developer Discussion
> Subject: [MarkLogic Dev General] Re: Separate
> searchable-expressions for different constraints?
>
> Okay, it sounds like you have the basic idea of what I'm
> considering doing.  My example had only two different
> sections to search over, but in reality there could be N such
> sections.  I think you meant to suggest using
> <additional-query> with cts:document-query, not
> cts:directory-query.  That is helpful; I was also planning on
> multiple queries, but your suggestion of using
> additional-query will make things easier.
>
> The data could be modeled in a different way make this
> simpler, but there are trade-offs and I'm still weighing
> different data modeling approaches.
>
> Thanks again,
> Karl
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
>
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to