Hi everyone, I've got a problem where I have docs with a source_id field, and there can be many docs from each source. Searches will typically return docs from many sources. I want to restrict the number of docs from each source in results, so there will be no more than (say) 3 docs from source_id=123 etc.
Field collapsing is the obvious approach, but I want to get the results back in relevancy order, not grouped by source_id. So it looks like I'll have to fetch more docs than I need to and re-sort them. It might even be better to count source_ids in the client code and drop excess docs that way, but the potential overhead is large. Is there any way of doing this in Solr without hacking in a custom Lucene Collector? (which doesn't look all that straightforward). cheers, Tom