|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectScorer
SpanScorer
SpanRecordingScorer
public class SpanRecordingScorer
Runs a span query and scores the resulting spans, passing them to a SpanHitCollector if specified.
Field Summary | |
---|---|
private String |
field
Field being queried (a Span query can only work on one field |
private int |
maxSpans
Max # of spans to record (highest scoring are kept, others tossed) |
(package private) int |
nSpans
Number of spans recorded for this document |
(package private) int |
nToDedupe
How many spans to de-duplicate |
(package private) Span[] |
posOrder
Array of recorded spans, in position order |
(package private) int |
scoredDoc
Last document that was scored |
(package private) Set |
terms
Set of all search terms |
(package private) Span[] |
toDedupe
Array to de-dupe, in position order |
(package private) int |
totalDeduped
Total deduped, not limited by maxSpans |
Fields inherited from class SpanScorer |
---|
doc, firstTime, freq, more, spans, value, weight |
Constructor Summary | |
---|---|
SpanRecordingScorer(Spans spans,
SpanWeight weight,
Similarity similarity,
int maxSpans)
Construct a recording scorer. |
Method Summary | |
---|---|
protected boolean |
advance()
Worker method used by SpanScorer.next() and
SpanScorer.skipTo(int) . |
private void |
expand()
Enlarge the arrays used to keep track of spans |
String |
getField()
|
int |
getMaxSpans()
|
int |
getSpanCount()
|
int |
getSpanDoc()
|
Span[] |
getSpans()
|
Set |
getTerms()
|
float |
score()
|
Methods inherited from class SpanScorer |
---|
doc, explain, next, skipTo |
Methods inherited from class Scorer |
---|
getSimilarity, score, score |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private String field
private int maxSpans
int nSpans
int scoredDoc
int totalDeduped
maxSpans
Span[] posOrder
Span[] toDedupe
int nToDedupe
Set terms
Constructor Detail |
---|
SpanRecordingScorer(Spans spans, SpanWeight weight, Similarity similarity, int maxSpans) throws IOException
spans
- set of spans to processweight
- weight of this querysimilarity
- used to calculate scores, and compare queriesmaxSpans
- max # of spans to collect
IOException
Method Detail |
---|
protected boolean advance() throws IOException
SpanScorer.next()
and
SpanScorer.skipTo(int)
.
advance
in class SpanScorer
IOException
private void expand()
public int getSpanDoc()
public String getField()
public int getSpanCount()
public Span[] getSpans()
public int getMaxSpans()
public Set getTerms()
public float score() throws IOException
score
in class SpanScorer
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |