Hi ,
Below is the structure of my document. I want to find the date under the
<product-reference> and not the date from the <store-reference>.
XML-STRUCTURE
<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>
I have create this optionsname as "date-product" and constraint as
<constraint name='date'>
<range collation='http://marklogic.com/collation/' type='xs:string'
facet='false'>
<path-index>/publication-reference/date</path-index>
</range>
</constraint>
JAVA CODE
QueryManager queryMgr = client.newQueryManager();
ValuesDefinition query =
queryMgr.newValuesDefinition("date-product",
"date");
ValuesHandle values = queryMgr.values(query, new ValuesHandle());
for (CountedDistinctValue value : values.getValues()) {
String textValue = value.get("xs:string", String.class);
System.out.println(textValue );
}
I am not getting any results.
Am I missing something or could somebody correct my code or help me with
how to find values with path-index with range element index I am getting
the results.
Thanks
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general