[MarkLogic Dev General] Search documents without a node tag
Mariano Grau Calín
mgrau at grupojoly.com
Tue Jan 3 05:48:37 PST 2012
Hi all,
We want to find documents where a node tag not exist.
By example, this query return documents where TITLE has a value. The opposite we want.
doc()/DOC[AGENCY='EFE' and TITLE]
If we try to negate query, result is not like expected.
doc()/DOC[AGENCY='Grupo Joly' and TITLE[text() is null]] (: same result :)
doc()/DOC[AGENCY='EFE' and not(TITLE)] (: all documents where TITLE exists or not exists :)
doc()/DOC[AGENCY='EFE' and TITLE=''] (: zero results!!! :)
Really, we'd like to define a constraint in search api and to write something like:
search:search('title:null age:efe)
Or otherwise a additionat-query with cts:query code.
Regards,
Mariano Grau
mgrau @ grupojoly.com
Dpto. Sistemas
Grupo Joly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120103/75f88f00/attachment.html
More information about the General
mailing list