Have tried replacing with <path-index> still getting this error
RESTAPI-EMPTYBODY (err:FOER0000):

<?xml version="1.0" encoding="UTF-8"?>
<options xmlns="http://marklogic.com/appservices/search";>
<constraint name="date">
  <range collation="http://marklogic.com/collation/"; type="xs:string"
facet="false">
    <path-index>product-reference/date</path-index>
  </range>
</constraint>
</options>

Thanks
sd

On Sat, Apr 4, 2015 at 11:36 PM, Shashidhar Rao <[email protected]>
wrote:

> Just created path range indexes for the above date, and was trying to
> write the options through QueryOptionsManager  writeOptions method, but for
> Range index it is working but for Path range index the options is giving me
> java.lang.NullPointerException
>
> My Path Range Index settings.
> scalar type = string
> path expression = "product-reference/date"
> collation ="http://marklogic.com/collation/";
>
> Options I want to write through QueryOptionsManager
> <?xml version="1.0" encoding="UTF-8"?>
> <options xmlns="http://marklogic.com/appservices/search"; >
> <constraint name="date">
>   <range type="xs:string" collation="http://marklogic.com/collation/";>
>    <element ns="" name="product-reference/date"/>
>    </range>
> </constraint>
> </options>
>
>  Appreciate if someone could help me fix this issue. I had gone through
> the documentation but could not find the options xml for Path range index.
> Maybe the <range> is not what is expected for Path range index.
>
> Thanks
> sd
>
> On Sat, Apr 4, 2015 at 6:47 PM, Shashidhar Rao <[email protected]
> > wrote:
>
>> Could some help me with creating the range index for a duplicated nested
>> element
>>
>> A snippet of my xml structure is given below and I want to create range
>> index for the date under the <product-reference> for the facets and not the
>> date under the
>> <store-reference> . How should I do it . Appreciate if some could help me
>> out.
>>
>> 2. Is it still possible for me to create both the date as range indexes
>> which one marklogic will pick up if I create range indexes for both date
>> under <product-reference> and date under <store-reference>.
>>
>>
>> <product-reference>
>> <product-id>
>> <country>IND</country>
>> <product-number>AA-503</product-number>
>> <product-type>apparel</product-type>
>> <date>20130105</date>
>> </product-id>
>> </product-reference>
>> <store-reference>
>> <store-id>
>> <country>JP</country>
>> <store-number>8369</store-number>
>> <date>20120906</date>
>> </store-id>
>> </store-reference>
>>
>> thanks
>> sd
>>
>>
>
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to