Re: Mixing ordinary and nested documents

2014-07-24 Thread Bjørn Axelsen
thank you very much :-) 2014-07-22 16:34 GMT+02:00 Umesh Prasad : > public static DocSet mapChildDocsToParentOnly(DocSet childDocSet) { > > DocSet mappedParentDocSet = new BitDocSet(); > DocIterator childIterator = childDocSet.iterator(); > while (childIterator.hasNext

Re: Mixing ordinary and nested documents

2014-07-22 Thread Umesh Prasad
public static DocSet mapChildDocsToParentOnly(DocSet childDocSet) { DocSet mappedParentDocSet = new BitDocSet(); DocIterator childIterator = childDocSet.iterator(); while (childIterator.hasNext()) { int childDoc = childIterator.nextDoc(); int par

Re: Mixing ordinary and nested documents

2014-07-22 Thread Umesh Prasad
Query parentFilterQuery = new TermQuery(new Term("document_type", "parent")); int[] childToParentDocMapping = new int[searcher.maxDoc()]; DocSet allParentDocSet = searcher.getDocSet(parentFilterQuery); DocIterator iter = allParentDocSet.iterator();

Re: Mixing ordinary and nested documents

2014-07-22 Thread Bjørn Axelsen
Thanks, Umesh You can get the parent bitset by running a the parent doc type query on > the solr indexsearcher. > Then child bitset by runnning the child doc type query. Then use these > together to create a int[] where int[i] = parent of i. > Can you kindly add an example? I am not quite sure h

Re: Mixing ordinary and nested documents

2014-07-18 Thread Umesh Prasad
Comments inline On 16 July 2014 20:31, Bjørn Axelsen wrote: > Hi Solr users > > I would appreciate your inputs on how to handle a *mix *of *simple *and > *nested > *documents in the most easy and flexible way. > > I need to handle: > >- simple documens: webpages, short articles etc. (approx

Mixing ordinary and nested documents

2014-07-16 Thread Bjørn Axelsen
Hi Solr users I would appreciate your inputs on how to handle a *mix *of *simple *and *nested *documents in the most easy and flexible way. I need to handle: - simple documens: webpages, short articles etc. (approx. 90% of the content) - nested documents: books containing chapters etc.