Structure of JSON documents required to be searched in Marklogic
{
"MESSAGEID":"18878285",
"ORDERNUMBER":["2295796"],
"CATEGORY":"F3702200000"
}
I wanted to search the URIs of all JSON documents in Marklogic that comprised of not null ORDERNUMBER
using Javascript
I am using the following query but it is still showing the URIs for the documents comprising of "ORDERNUMBER":[]
cts.uris("",null,cts.andQuery
([
cts.jsonPropertyValueQuery("ORDERNUMBER", "*", "wildcarded"),
cts.notQuery(cts.jsonPropertyValueQuery("ORDERNUMBER",""))
])
);