Hi -

I'd like to be able to limit the number of documents returned from any particular group of documents, much as Google only shows a max of two results from any one website.

The docs are all marked as to which group they belong to. There will probably be multiple groups returned from any search. Documents belong to only one group

I could just examine each returned document, and discard documents from groups I have seen before, but that seems slow (but I'm not sure there is a better alternative).

The number of groups is fairly high percentage of the number of documents (maybe 5% of all documents), so building something like a filter for each group doesn't seem feasible.

CustomHitCollector of some sort could work, but there is the comment in the javadoc about "should not call Searcher.doc(int) or IndexReader.document(int) on every document number encountered." which would seem to be necessary to get the group id.

Does Solr add anything to Lucene in this regard?

Thanks,

Tom

Reply via email to