Hi ,

Can someone help me with the JAVA API query formation for the below sample

Let's say this is file 1 and there are 1000 such different files
 <info>
  <company>ibm</company>
  <year>2001</year>
  <country>US</country>
</info>

I just want to get the country, year and the count.

US 2001  70
US 2014   13
JAPAN 2000 10

Something like the above, I am able to get the count of only one element
not two

QueryOptionsHandle options = new QueryOptionsHandle().withValues(
            qob.values("product",
                    qob.range(
                        qob.elementRangeIndex(new QName("country"),

qob.stringRangeType(QueryOptions.DEFAULT_COLLATION))),
                    "frequency-order"));
The above query gives me

US 190
CH  123
IND  70


Thanks
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to