Re: Group only top 50 results not All results.

2014-07-13 Thread Umesh Prasad
Another way is to extend the existing Facets component. FacetsComponent uses SimpleFacets to compute facets where it passes the matching docset (rb.getResults.docSet) as an argument in constructor. Instead you can pass it the ranked docList by passing (rb.getResults.docList). Basically 3 steps

Re: Group only top 50 results not All results.

2014-07-12 Thread Joel Bernstein
I agree with Alex a PostFilter would work. But it would be a somewhat tricky PostFilter to write. You would need to collect the top 50 documents using a priority queue in the DelegatingCollector.collect() method. Then in the DelegatingCollector.finish() method you would send the top documents to th

Re: Group only top 50 results not All results.

2014-07-12 Thread Alexandre Rafalovitch
I don't think either grouping or faceting work as postfilter. Otherwise, that would be one way. Have a custom post-filter that only allows top 50 documents and have grouping run as an even-higher-cost postfilter after that. Regards, Alex. Personal: http://www.outerthoughts.com/ and @arafalov So

Re: Group only top 50 results not All results.

2014-07-12 Thread Erick Erickson
You could also return the top 50 groups. That will certainly contain the top 50 responses. The app layer could then do some local sorting to figure out what was correct. Maybe you'd be returning 3 docs in each or something... I'd probably only go there if Michael's approach didn't work out though.

RE: Group only top 50 results not All results.

2014-07-11 Thread Michael Ryan
I suggest doing this in two queries. In the first query, retrieve the unique ids of the top 50 documents. In the second query, just query for those ids (e.g., q=ids:(2 13 55 62 81)), and add the facet parameters on that query. -Michael -Original Message- From: Aaron Gibbons [mailto:agib