HI.

I suggest you verify your path range indexes in query console to make sure
they are correct *before* you go any further.

You state that the path range index you created is: product-reference/date

However, looking at your provided XML, that path does not exist. Date is
under:  product-reference/product-id/date

​Note:
I test things like this in query console by adding the xPath expression to
the test XML.  For you sample, the following is how I noted the need for
product-id:
<xml>
<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>
</xml>/product-reference/product-id/date​


Kind Regards,
David Ennis


David Ennis
*Content Engineer*

[image: HintTech]  <http://www.hinttech.com/>
Mastering the value of content
creative | technology | content

Delftechpark 37i
2628 XJ Delft
The Netherlands
T: +31 88 268 25 00
M: +31 63 091 72 80

[image: http://www.hinttech.com] <http://www.hinttech.com>
<https://twitter.com/HintTech>  <http://www.facebook.com/HintTech>
<http://www.linkedin.com/company/HintTech>

On 5 April 2015 at 07:02, Shashidhar Rao <[email protected]> wrote:

> 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
>
>
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to