I am using lib-parse, and I can do searches like "(AUTHOR: john AND
AUTHOR:smith)". However, this doesn't do the right thing if there are
multiple authors. I want to do a search like "AUTHOR:(john AND smith)",
but lib-parse does not seem to construct the correct expression for this
search. It looks like lib-parse is creating a and-query that combines an
element-query with an empty word query and a second and-query of two
word-queries, rather than creating an element-query with an and-query
that contains two word-queries (see the attached XML of the query).
Since the recursive parser for boolean expressions already exists in
lib-parse, is there an easy way to fix lib-parse to create the correct
search expression when doing a search with boolean expressions within a
field? Thanks.
-Dave
<lib-query>AUTHOR:(john AND smith)</lib-query>
<query>
<cts:and-query xmlns:cts="http://marklogic.com/cts">
<cts:and-query>
<cts:element-query>
<cts:element>AUTHOR</cts:element>
<cts:word-query />
</cts:element-query>
<cts:and-query>
<cts:word-query>
<cts:text xml:lang="en">john</cts:text>
</cts:word-query>
<cts:word-query>
<cts:text xml:lang="en">smith</cts:text>
</cts:word-query>
</cts:and-query>
</cts:and-query>
<cts:collection-query>
<cts:uri>HEAD</cts:uri>
</cts:collection-query>
</cts:and-query>
</query>
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general