[MarkLogic Dev General] Separate searchable-expressions for
Danny.Sokolsky at marklogic.com
Mon Apr 5 18:39:18 PDT 2010
You can add an <additional-query> option to your search:search options node. If your additional-query is a cts:element-query, then that will constrain results to ones matching within that element. If you have different criteria for different elements, you can make the additional-query a cts:or-query of multiple element-queries.
From: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] On Behalf Of Karl Erisman
Sent: Monday, April 05, 2010 3:11 PM
To: General Mark Logic Developer Discussion
Subject: [MarkLogic Dev General] Separate searchable-expressions for different constraints?
In a call to search:search, is there any way to specify multiple
searchable-expressions, each applying to a certain set of constraints?
I want to specify that certain constraints must be satisfied beneath
a specific element and that certain other constraints must be
satisfied beneath another specific element. Using just one
<searchable-expression> requires that ALL constraints be satisfied
within ONE particular element.
If it's not possible, what would be the recommended way to search for
docs using different criteria for separate subtrees?
General mailing list
General at developer.marklogic.com
More information about the General