: For example, if I display of 20 results, I might want to limit it to a : maximum of 10 "mail", 10 "blog" and 10 "website" documents. Which ones : get displayed and how they were ordered would depend on the normal : relevancy ranking, but, for example, once I had 10 "mail" objects to : display on the page, the effect would be that other "mail" objects : relevancy would drop below "blog" and "website". If there aren't 10 of : one of these, then the I'm allowed to exceed the maximum of 10 so that I : get 20 results. What I don't want is 20 "mail" documents if there are : "blog" and/or "website" documents to display.
Most of what you're asking about is a straight forward use of Result Grouping... http://wiki.apache.org/solr/FieldCollapsing ...the nit is your statement 'the effect would be that other "mail" objects relevancy would drop below "blog" and "website"' ... grouping doesn't change the relevancy scores, it just limits the number of results per field value. the canonical UI is to show users the top N per group on the main page (you can interleave them if you want, or leave them grouped), but give them them links to see all (ie: redo the search with no grouping and allow pagination) or see all of a particular type (ie: redo the search with no grouping and an fq; allow pagination) -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org