Typically "a huge xml data" is an indication that you're using XML documents more like relational tables than rows, to draw a comparison. Documents in MarkLogic are designed to act more like rows. (And collections more like tables.) Put individual records in their own documents. If you have many Product instances, you into its own document. This may require some up-front processing to split things out. (See, for example, <http://docs.marklogic.com/guide/ingestion/content-pump#id_65814>.) From there you can set range indexes on any or all of a Product's dimensions. Use cts:values() or the related lexicon functions to get distinct values and their frequencies.
If you can provide some more details on what your data and queries look like, others may be able to help more. Justin -- Justin Makeig Director, Product Management MarkLogic [email protected] > On Feb 13, 2015, at 1:50 PM, Maisnam Ns <[email protected]> wrote: > > Hi, > > Can someone help with this use case. > > I have a huge xml data in which product is one of the elements. I want to > find the top 10 products from these data. > > Product is not in the range index and will not be part of facets. > How to search this with JAVA API and not with xquery. > > Secondly, I need to divide the data into two parts. In marklogic there are > directories and collections. > > But how do I search a string from say part A if data is divided into part A > and part B.There is an option to select just from part A , part B and both > Part A and Part B. Depending on selection of options, if I select Part A , > the string has to search from Part A likewise for Part B and if both A and B > is selected it has to search from both A and B. > > Please let me know how to do this in java. A snippet of code will be highly > appreciated. > > And , information studio of Marklogic does not provide any option for > collections , it only provides for different directories. > > Thanks in advance > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
