lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Beard, Brian" <Brian.Be...@mybir.com>
Subject FieldValueHitQueue question - migration to 3.0
Date Thu, 21 Jan 2010 21:31:56 GMT
Since FieldSortedHitQueue was deprecated in 3.0, I'm converting to the
new FieldValueHitQueue.

The trouble I'm having is coming up with a way to use FieldValueHitQueue
in a Collector so it is decoupled from a TopDocsCollector.

What I'd like to do is have a custom Collector that can add objects
extended from a FieldDoc to a queue class that extends from
FieldValueHitQueue. The problem is FieldValueHitQueue hides its
constructor, and uses a package protected static Entry class that
extends ScoreDoc and is not visible to any class extending from it.
Alternatively I could just modify the classes so I can extend from Entry
myself, but I thought there might be a better way to do this I'm not
seeing.

Is there a way to decouple the FieldValueHitQueue from the Entry so it
can take classes extended from FieldDoc types?

Also, I noticed that there is a FieldDocSortedHitQueue used with
MultiSearcher. Are there any reasons to not use  a clone of this class
rather than the FieldValueHitQueue?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message