[ 
https://issues.apache.org/jira/browse/LUCENE-6066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14277279#comment-14277279
 ] 

Mark Harwood commented on LUCENE-6066:
--------------------------------------

What feels awkward in the example Junit is that diversified collections are not 
compatible with existing Sort functionality - I had to use a custom Similarity 
class to sort by the popularity of songs in my test data. 
Combining the diversified collector with any other form of existing collector 
(e.g. TopFieldCollector to achieve field-based sorting) via wrapping is 
problematic because the other collectors all work with an assumption that 
previously collected elements are never recalled. The diversifying collector 
needs the ability to recall previously collected elements when new elements 
with the same key need to be substituted.

> Collector that manages diversity in search results
> --------------------------------------------------
>
>                 Key: LUCENE-6066
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6066
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/query/scoring
>            Reporter: Mark Harwood
>            Priority: Minor
>             Fix For: 5.0
>
>         Attachments: LUCENE-PQRemoveV5.patch
>
>
> This issue provides a new collector for situations where a client doesn't 
> want more than N matches for any given key (e.g. no more than 5 products from 
> any one retailer in a marketplace). In these circumstances a document that 
> was previously thought of as competitive during collection has to be removed 
> from the final PQ and replaced with another doc (eg a retailer who already 
> has 5 matches in the PQ receives a 6th match which is better than his 
> previous ones). This requires a new remove method on the existing 
> PriorityQueue class.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to