Re: [MarkLogic Dev General] Range index for duplicate element for facets how to

2015-04-05 Thread David Ennis
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:



IND
AA-503
apparel
20130105


/product-reference/product-id/date​


Kind Regards,
David Ennis


David Ennis
*Content Engineer*

[image: HintTech]  
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] 
  


On 5 April 2015 at 07:02, Shashidhar Rao  wrote:

> Have tried replacing with  still getting this error
> RESTAPI-EMPTYBODY (err:FOER):
>
> 
> http://marklogic.com/appservices/search";>
> 
>   http://marklogic.com/collation/"; type="xs:string"
> facet="false">
> product-reference/date
>   
> 
> 
>
> Thanks
> sd
>
> On Sat, Apr 4, 2015 at 11:36 PM, Shashidhar Rao <
> raoshashidhar...@gmail.com> 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
>> 
>> http://marklogic.com/appservices/search"; >
>> 
>>   http://marklogic.com/collation/";>
>>
>>
>> 
>> 
>>
>>  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  is not what is expected for Path range index.
>>
>> Thanks
>> sd
>>
>> On Sat, Apr 4, 2015 at 6:47 PM, Shashidhar Rao <
>> raoshashidhar...@gmail.com> 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  for the facets and not the
>>> date under the
>>>  . 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  and date under .
>>>
>>>
>>> 
>>> 
>>> IND
>>> AA-503
>>> apparel
>>> 20130105
>>> 
>>> 
>>> 
>>> 
>>> JP
>>> 8369
>>> 20120906
>>> 
>>> 
>>>
>>> thanks
>>> sd
>>>
>>>
>>
>
> ___
> General mailing list
> General@developer.marklogic.com
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Range index for duplicate element for facets how to

2015-04-04 Thread Shashidhar Rao
Have tried replacing with  still getting this error
RESTAPI-EMPTYBODY (err:FOER):


http://marklogic.com/appservices/search";>

  http://marklogic.com/collation/"; type="xs:string"
facet="false">
product-reference/date
  



Thanks
sd

On Sat, Apr 4, 2015 at 11:36 PM, Shashidhar Rao 
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
> 
> http://marklogic.com/appservices/search"; >
> 
>   http://marklogic.com/collation/";>
>
>
> 
> 
>
>  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  is not what is expected for Path range index.
>
> Thanks
> sd
>
> On Sat, Apr 4, 2015 at 6:47 PM, Shashidhar Rao  > 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  for the facets and not the
>> date under the
>>  . 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  and date under .
>>
>>
>> 
>> 
>> IND
>> AA-503
>> apparel
>> 20130105
>> 
>> 
>> 
>> 
>> JP
>> 8369
>> 20120906
>> 
>> 
>>
>> thanks
>> sd
>>
>>
>
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Range index for duplicate element for facets how to

2015-04-04 Thread Geert Josten
Hi sd,

You need to use  instead of  inside the range constraint. 
See also the documentation of search options:

http://docs.marklogic.com/search:search?q=search:search&v=8.0&api=true#opt-constraint

Look for range constraint, and then locate the last example.

Cheers,
Geert

From: Shashidhar Rao 
mailto:raoshashidhar...@gmail.com>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Date: Saturday, April 4, 2015 at 7:06 PM
To: "general@developer.marklogic.com<mailto:general@developer.marklogic.com>" 
mailto:general@developer.marklogic.com>>
Subject: Re: [MarkLogic Dev General] Range index for duplicate element for 
facets how to

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

http://marklogic.com/appservices/search"; >

  http://marklogic.com/collation/";>
   
   



 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  is not what is expected for Path range index.

Thanks
sd

On Sat, Apr 4, 2015 at 6:47 PM, Shashidhar Rao 
mailto:raoshashidhar...@gmail.com>> 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  for the facets and not the date 
under the
 . 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 
 and date under .




IND
AA-503
apparel
20130105




JP
8369
20120906



thanks
sd


___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Range index for duplicate element for facets how to

2015-04-04 Thread Shashidhar Rao
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

http://marklogic.com/appservices/search"; >

  http://marklogic.com/collation/";>
   
   



 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  is not what is expected for Path range index.

Thanks
sd

On Sat, Apr 4, 2015 at 6:47 PM, Shashidhar Rao 
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  for the facets and not the
> date under the
>  . 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  and date under .
>
>
> 
> 
> IND
> AA-503
> apparel
> 20130105
> 
> 
> 
> 
> JP
> 8369
> 20120906
> 
> 
>
> thanks
> sd
>
>
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Range index for duplicate element for facets how to

2015-04-04 Thread David Ennis
Use a path index perhaps

On 4 April 2015 15:17:40 CEST, Shashidhar Rao  
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  for the facets and not
>the
>date under the
> . 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  and date under .
>
>
>
>
>IND
>AA-503
>apparel
>20130105
>
>
>
>
>JP
>8369
>20120906
>
>
>
>thanks
>sd
>
>
>
>
>___
>General mailing list
>General@developer.marklogic.com
>Manage your subscription at: 
>http://developer.marklogic.com/mailman/listinfo/general
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Range index for duplicate element for facets how to

2015-04-04 Thread Shashidhar Rao
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  for the facets and not the
date under the
 . 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  and date under .




IND
AA-503
apparel
20130105




JP
8369
20120906



thanks
sd
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general