As my title says, I met some problem when I change the position for not-query, then I found that not-query does not work. It looks like it disappeared. I give an example as below.
cts:element-query(fn:QName("http://www.test/jeremy","doc"),
cts:and-query(
(cts:or-query((cts:and-query(
(cts:collection-query("xxxx"),
cts:or-query((
cts:directory-query("/xxx/", "1"),
cts:directory-query("/xxxx/", "1"),
cts:directory-query("/xxxxxx/", "1"),
cts:directory-query("/xx/x/", "1"),
cts:directory-query("/xxxxx/", "1")), ()),
cts:element-range-query(fn:QName("http://www.test/jeremy","apple"), "=", "xxxxxxx",("collation=http://marklogic.com/collation/codepoint"), 1),
cts:or-query(cts:element-value-query(fn:QName("http://www.test/jeremy","banana"), "SHANGHAI", ("lang=en"), 0), ())), ()),
cts:not-query(cts:element-value-query(fn:QName("http://www.test/jeremy","orange"), "123456", ("lang=en"), 0), 0)), ()),
cts:not-query(cts:element-attribute-range-query(fn:QName("http://www.test/jeremy","groupid"), fn:QName("","isGood"), "=", "false", ("collation=http://marklogic.com/collation/codepoint"), 1), 0)
),
()),
())
Is there any god would help me with this. I am a new guy for marklogic, so I really need your help.