[MarkLogic Dev General] Excluding elements from search

Peter Hickman peter.hickman at semantico.com
Mon Jun 18 05:27:17 PDT 2007

I have a document structure that is rooted in, for example, <document> 
which has somewhere in it an <authors> element.

Sometimes I want to search <document> and all its descendants, this I 
can do without any problems in MarkLogic.

However sometimes I want to search <document> and all its descendants 
but exclude <authors> and it's descendants. For the life of me I can't 
work out how to phrase this.

Does anyone have any ideas (that doesn't involve changing the structure 
of the document) how this might be achieved with MarkLogic. I am led to 
understand that the 'fields' feature of 3.2 might be of some use here 
but again am unsure as to how this might be used.


Peter Hickman.

Semantico, Lees House, 21-23 Dyke Road, Brighton BN1 3FE
t: 01273 358223
f: 01273 723232
e: peter.hickman at semantico.com
w: www.semantico.com

More information about the General mailing list