Hi Will,
I hope you are doing well. It's nice to see your name pop up.
I tested out your example on a new database in ML 9.0-3 and it worked just fine
for me. Can you try to fn:doc() the document and make sure you can see it? If
you can, check to make sure your document is not a binary node with
xdmp:node-kind(fn:doc("/test.json")/node()) .
Best,
Rob
Rob Szkutak
Senior Consultant
MarkLogic Corporation
www.marklogic.com<http://www.marklogic.com>
________________________________
From: [email protected]
<[email protected]> on behalf of Will Thompson
<[email protected]>
Sent: Tuesday, November 7, 2017 5:36:31 PM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Full-text search and JSON
Is it possible to search generally against text tokens in JSON documents? All
of the JSON-specific cts:queries require property names, and cts:word-query
doesn't appear to match JSON documents. For example, if I have a document with
URI "/test.json":
{
"id" : 1234,
"text" : "The quick brown fox jumps over the lazy dog."
}
cts:search(doc(), "brown fox") returns empty. Is there another way to do this?
-Will
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general