Issue Details (XML | Word | Printable)

Key: LUCENE-1356
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Doron Cohen
Reporter: Shai Erera
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

Allow easy extensions of TopDocCollector

Created: 13/Aug/08 01:59 PM   Updated: 11/Oct/08 12:49 PM
Return to search
Component/s: Index
Affects Version/s: None
Fix Version/s: 2.3.3, 2.4

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works 1356-2.patch 2008-08-18 08:09 AM Shai Erera 2 kB
Text File Licensed for inclusion in ASF works 1356.patch 2008-08-13 02:00 PM Shai Erera 0.8 kB

Lucene Fields: Patch Available, New
Resolution Date: 03/Sep/08 11:19 PM


 Description  « Hide
TopDocCollector's members and constructor are declared either private or package visible. It makes it hard to extend it as if you want to extend it you can reuse its hq and totatlHits members, but need to define your own. It also forces you to override getTotalHits() and topDocs().
By changing its members and constructor (the one that accepts a PQ) to protected, we allow users to extend it in order to get a different view of 'top docs' (like TopFieldCollector does), but still enjoy its getTotalHits() and topDocs() method implementations.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #691824 Wed Sep 03 23:18:51 UTC 2008 doronc LUCENE-1356: Allow easy extensions of TopDocCollector.
Files Changed
MODIFY /lucene/java/trunk/CHANGES.txt
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/search/TopFieldDocCollector.java
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/search/TopDocCollector.java