You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Beard, Brian" <Br...@mybir.com> on 2010/01/21 22:31:56 UTC

FieldValueHitQueue question - migration to 3.0

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?