Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-Dev

[jira] Created: (LUCENE-2057) TopDocsCollector should not be declared with generic <T>

 

 

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded


jira at apache

Nov 11, 2009, 11:50 AM

Post #1 of 1 (131 views)
Permalink
[jira] Created: (LUCENE-2057) TopDocsCollector should not be declared with generic <T>

TopDocsCollector should not be declared with generic <T>
--------------------------------------------------------

Key: LUCENE-2057
URL: https://issues.apache.org/jira/browse/LUCENE-2057
Project: Lucene - Java
Issue Type: Bug
Components: Search
Reporter: Shai Erera
Fix For: 3.0


TopDocsCollector was changed to be TopDocsCollector<T>. However it has methods which specifically assume the PQ stores ScoreDoc. Therefore, if someone extends it and defines a type which is not ScoreDoc, things will break.

We shouldn't put <T> on TopDocsCollector at all, but rather change its ctor to *protected TopDocsCollector(PriorityQueue<? extends ScoreDoc> pq)*. TopDocsCollector should handle ScoreDoc types. If we do this, we'll need to change FieldValueHitQueue's Entry to extend ScoreDoc as well.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe [at] lucene
For additional commands, e-mail: java-dev-help [at] lucene

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.