java.lang.Object | ||
↳ | org.apache.lucene.search.DocIdSetIterator | |
↳ | org.apache.lucene.search.Scorer |
Known Direct Subclasses |
Known Indirect Subclasses |
Expert: Common scoring functionality for different types of queries.
A Scorer
iterates over documents matching a
query in increasing order of doc Id.
Document scores are computed using a given Similarity
implementation.
NOTE: The values Float.Nan,
Float.NEGATIVE_INFINITY and Float.POSITIVE_INFINITY are
not valid scores. Certain collectors (eg TopScoreDocCollector
) will not properly collect hits
with these scores.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.lucene.search.DocIdSetIterator
|
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a Scorer.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the Similarity implementation used by this scorer.
| |||||||||||
Scores and collects all matching documents.
| |||||||||||
Returns the score of the current document matching the query.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Expert: Collects matching documents in a range.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.lucene.search.DocIdSetIterator
| |||||||||||
From class
java.lang.Object
|
Constructs a Scorer.
similarity | The Similarity implementation used by this scorer.
|
---|
Scores and collects all matching documents.
collector | The collector to which all matching documents are passed. |
---|
IOException |
---|
Returns the score of the current document matching the query.
Initially invalid, until nextDoc()
or advance(int)
is called the first time, or when called from within
collect(int)
.
IOException |
---|
Expert: Collects matching documents in a range. Hook for optimization.
Note, firstDocID
is added to ensure that nextDoc()
was called before this method.
collector | The collector to which all matching documents are passed. |
---|---|
max | Do not score documents past this. |
firstDocID | The first document ID (ensures nextDoc() is called before
this method. |
IOException |
---|