[MarkLogic Dev General] Search Constraints in XQuery

Charles Greer Charles.Greer at marklogic.com
Tue Jan 19 20:04:06 PST 2016


Hello Ravi,

Your guess is correct -- json-property can not be used for nested elements.

You can add additional query terms to limit the search to 'registrar', like a container-query
(that would be a runtime additional query to AND with the bare json-property)

or if you can use a path range index (wouldn't be for matches and wildcards though),
a path range index with path definition  registrar/username would match the location you have.

Not sure how helpful this response is though..

Charles


________________________________
From: general-bounces at developer.marklogic.com [general-bounces at developer.marklogic.com] on behalf of Ravindra B Mamidipaka [ravi_b_m at hotmail.com]
Sent: Tuesday, January 19, 2016 12:54 PM
To: general at developer.marklogic.com
Subject: [MarkLogic Dev General] Search Constraints in XQuery


In the search:search in XQuery.. for search constraints , how do I specify the json-property to be nested ? I am trying this and it does not work

<options xmlns="http://marklogic.com/appservic...<http://marklogic.com/appservices/search>">
<constraint name="concept.registrar.username">
<value>
<json-property>registrar/username</json-property>
<term-option>case-insensitive</term-option>
<term-option& gt;wildc arded</term-option>
</value>
</constraint>
</options>



Thanks,

Ravi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20160120/c7b1c50a/attachment.html 


More information about the General mailing list