Geert,

I think I may have to do something like this to make indexes for JSON docs more 
easily configurable. 

-Will

> On Nov 7, 2017, at 11:49 PM, Geert Josten <[email protected]> wrote:
> 
> Well, you could give your json doc a root property.. :)
> 
> { root: { id: 1234, text: ³brown fox² } }
> 
> Cheers
> 
> On 11/8/17, 4:03 AM, "[email protected] on behalf of
> Will Thompson" <[email protected] on behalf of
> [email protected]> wrote:
> 
>> Hi Rob,
>> 
>> Likewise! I think I just figured it out. I am excluding root in the word
>> query index settings. The root of the document I was searching for is an
>> object-node though, so I suspect there's no way to include it.
>> 
>> -Will
>> 
>> 
>>> On Nov 7, 2017, at 8:36 PM, Rob Szkutak <[email protected]>
>>> wrote:
>>> 
>>> 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
>>> 
>>> 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:
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__developer.marklogic.com_mailman_listinfo_general&d=DwIFAw&c=IdrBOxAMwHPzAikPNzltHw&r=_thRNTuzvzYaEDwaA_AfnAe5hN2lWgi6qdluz6ApLYI&m=0owGAJ2hEyJmo5R7g9-MgbVrj2F0WG862Wxa423oasY&s=FvHOAGeeBNDlbNT7ycT50wjv1axJzTO740jjRMI_BKk&e=
>>> _______________________________________________
>>> General mailing list
>>> [email protected]
>>> Manage your subscription at:
>>> 
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__developer.marklogic.c
>>> om_mailman_listinfo_general&d=DwICAg&c=IdrBOxAMwHPzAikPNzltHw&r=_thRNTuzv
>>> zYaEDwaA_AfnAe5hN2lWgi6qdluz6ApLYI&m=IL-JssAmKFbFz-tiCY8C6KCgrkw4LBVMCgi9
>>> znH0jKM&s=1DKnkzzBpnXr44ZMhD1XHTPdzU8QtXT0Ie0dhXUx-3o&e=
>> 
>> _______________________________________________
>> General mailing list
>> [email protected]
>> Manage your subscription at:
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__developer.marklogic.com_mailman_listinfo_general&d=DwIFAw&c=IdrBOxAMwHPzAikPNzltHw&r=_thRNTuzvzYaEDwaA_AfnAe5hN2lWgi6qdluz6ApLYI&m=0owGAJ2hEyJmo5R7g9-MgbVrj2F0WG862Wxa423oasY&s=FvHOAGeeBNDlbNT7ycT50wjv1axJzTO740jjRMI_BKk&e=
> 
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at: 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__developer.marklogic.com_mailman_listinfo_general&d=DwIFAw&c=IdrBOxAMwHPzAikPNzltHw&r=_thRNTuzvzYaEDwaA_AfnAe5hN2lWgi6qdluz6ApLYI&m=0owGAJ2hEyJmo5R7g9-MgbVrj2F0WG862Wxa423oasY&s=FvHOAGeeBNDlbNT7ycT50wjv1axJzTO740jjRMI_BKk&e=

_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to