java.lang.Object
org.apache.lucene.search.Scorable
org.apache.lucene.search.Scorer
org.apache.lucene.sandbox.search.TermAutomatonScorer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classSorts by docID so we can quickly pull out all scorers that are on the same (lowest) docID.private static classSorts by position so we can visit all scorers on one doc, by position.private static class(package private) static classNested classes/interfaces inherited from class org.apache.lucene.search.Scorable
Scorable.ChildScorable -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final longprivate intprivate final PriorityQueue<TermAutomatonQuery.EnumAndScorer> private final LeafSimScorerprivate intprivate intprivate final TermAutomatonQuery.EnumAndScorer[]originalSubsOnDoc is an array of EnumAndScorer instances used to create this TermAutomatonScorer.private TermAutomatonScorer.PosState[]private final PriorityQueue<TermAutomatonQuery.EnumAndScorer> (package private) intprivate final RunAutomatonprivate final TermAutomatonQuery.EnumAndScorer[] -
Constructor Summary
ConstructorsConstructorDescriptionTermAutomatonScorer(TermAutomatonQuery.TermAutomatonWeight weight, TermAutomatonQuery.EnumAndScorer[] subs, int anyTermID, LeafSimScorer docScorer) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidintdocID()Returns the doc ID that is currently being scored.(package private) LeafSimScorerfloatgetMaxScore(int upTo) Return the maximum score that documents between the lasttargetthat this iterator wasshallow-advancedto included andupToincluded.(package private) TermAutomatonQuery.EnumAndScorer[]private TermAutomatonScorer.PosStategetPosition(int pos) iterator()Return aDocIdSetIteratorover matching documents.private voidPops all enums positioned on the current (minimum) docprivate voidPushes all previously pop'd enums back into the docIDQueuefloatscore()Returns the score of the current document matching the query.private voidshift(int pos) toString()Methods inherited from class org.apache.lucene.search.Scorer
advanceShallow, getWeight, twoPhaseIteratorMethods inherited from class org.apache.lucene.search.Scorable
getChildren, setMinCompetitiveScore, smoothingScore
-
Field Details
-
subsOnDoc
-
docIDQueue
-
posQueue
-
runAutomaton
-
positions
-
posShift
int posShift -
anyTermID
private final int anyTermID -
docScorer
-
numSubsOnDoc
private int numSubsOnDoc -
cost
private final long cost -
docID
private int docID -
freq
private int freq -
originalSubsOnDoc
originalSubsOnDoc is an array of EnumAndScorer instances used to create this TermAutomatonScorer. This field is only for explain purposes and should not be used for scoring/matching.
-
-
Constructor Details
-
TermAutomatonScorer
public TermAutomatonScorer(TermAutomatonQuery.TermAutomatonWeight weight, TermAutomatonQuery.EnumAndScorer[] subs, int anyTermID, LeafSimScorer docScorer) throws IOException - Throws:
IOException
-
-
Method Details
-
popCurrentDoc
private void popCurrentDoc()Pops all enums positioned on the current (minimum) doc -
pushCurrentDoc
private void pushCurrentDoc()Pushes all previously pop'd enums back into the docIDQueue -
iterator
Description copied from class:ScorerReturn aDocIdSetIteratorover matching documents.The returned iterator will either be positioned on
-1if no documents have been scored yet,DocIdSetIterator.NO_MORE_DOCSif all documents have been scored already, or the last document id that has been scored otherwise.The returned iterator is a view: calling this method several times will return iterators that have the same state.
-
getPosition
-
shift
private void shift(int pos) -
countMatches
- Throws:
IOException
-
getOriginalSubsOnDoc
TermAutomatonQuery.EnumAndScorer[] getOriginalSubsOnDoc() -
getLeafSimScorer
LeafSimScorer getLeafSimScorer() -
toString
-
docID
public int docID()Description copied from class:ScorableReturns the doc ID that is currently being scored. -
score
Description copied from class:ScorableReturns the score of the current document matching the query.- Specified by:
scorein classScorable- Throws:
IOException
-
getMaxScore
Description copied from class:ScorerReturn the maximum score that documents between the lasttargetthat this iterator wasshallow-advancedto included andupToincluded.- Specified by:
getMaxScorein classScorer- Throws:
IOException
-