class TermAutomatonScorer extends Scorer
Modifier and Type | Class and Description |
---|---|
private static class |
TermAutomatonScorer.DocIDQueue
Sorts by docID so we can quickly pull out all scorers that are on
the same (lowest) docID.
|
private static class |
TermAutomatonScorer.PositionQueue
Sorts by position so we can visit all scorers on one doc, by
position.
|
private static class |
TermAutomatonScorer.PosState |
(package private) static class |
TermAutomatonScorer.TermRunAutomaton |
Scorable.ChildScorable
Modifier and Type | Field and Description |
---|---|
private int |
anyTermID |
private long |
cost |
private int |
docID |
private PriorityQueue<TermAutomatonQuery.EnumAndScorer> |
docIDQueue |
private LeafSimScorer |
docScorer |
private int |
freq |
private java.util.Map<java.lang.Integer,BytesRef> |
idToTerm |
private int |
numSubsOnDoc |
private TermAutomatonScorer.PosState[] |
positions |
private PriorityQueue<TermAutomatonQuery.EnumAndScorer> |
posQueue |
(package private) int |
posShift |
private RunAutomaton |
runAutomaton |
private TermAutomatonQuery.EnumAndScorer[] |
subs |
private TermAutomatonQuery.EnumAndScorer[] |
subsOnDoc |
Constructor and Description |
---|
TermAutomatonScorer(TermAutomatonQuery.TermAutomatonWeight weight,
TermAutomatonQuery.EnumAndScorer[] subs,
int anyTermID,
java.util.Map<java.lang.Integer,BytesRef> idToTerm,
LeafSimScorer docScorer) |
Modifier and Type | Method and Description |
---|---|
private void |
countMatches() |
int |
docID()
Returns the doc ID that is currently being scored.
|
float |
getMaxScore(int upTo)
Return the maximum score that documents between the last
target
that this iterator was shallow-advanced to
included and upTo included. |
private TermAutomatonScorer.PosState |
getPosition(int pos) |
DocIdSetIterator |
iterator()
Return a
DocIdSetIterator over matching documents. |
private void |
popCurrentDoc()
Pops all enums positioned on the current (minimum) doc
|
private void |
pushCurrentDoc()
Pushes all previously pop'd enums back into the docIDQueue
|
float |
score()
Returns the score of the current document matching the query.
|
private void |
shift(int pos) |
java.lang.String |
toString() |
advanceShallow, getWeight, twoPhaseIterator
getChildren, setMinCompetitiveScore
private final TermAutomatonQuery.EnumAndScorer[] subs
private final TermAutomatonQuery.EnumAndScorer[] subsOnDoc
private final PriorityQueue<TermAutomatonQuery.EnumAndScorer> docIDQueue
private final PriorityQueue<TermAutomatonQuery.EnumAndScorer> posQueue
private final RunAutomaton runAutomaton
private final java.util.Map<java.lang.Integer,BytesRef> idToTerm
private TermAutomatonScorer.PosState[] positions
int posShift
private final int anyTermID
private final LeafSimScorer docScorer
private int numSubsOnDoc
private final long cost
private int docID
private int freq
public TermAutomatonScorer(TermAutomatonQuery.TermAutomatonWeight weight, TermAutomatonQuery.EnumAndScorer[] subs, int anyTermID, java.util.Map<java.lang.Integer,BytesRef> idToTerm, LeafSimScorer docScorer) throws java.io.IOException
java.io.IOException
private void popCurrentDoc()
private void pushCurrentDoc()
public DocIdSetIterator iterator()
Scorer
DocIdSetIterator
over matching documents.
The returned iterator will either be positioned on -1
if no
documents have been scored yet, DocIdSetIterator.NO_MORE_DOCS
if 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.private TermAutomatonScorer.PosState getPosition(int pos)
private void shift(int pos)
private void countMatches() throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public int docID()
Scorable
public float score() throws java.io.IOException
Scorable
public float getMaxScore(int upTo) throws java.io.IOException
Scorer
target
that this iterator was shallow-advanced
to
included and upTo
included.getMaxScore
in class Scorer
java.io.IOException