public final class BM25FQuery extends Query implements Accountable
Query
that treats multiple fields as a single stream and scores
terms as if you had indexed them as a single term in a single field.
For scoring purposes this query implements the BM25F's simple formula
described in:
http://www.staff.city.ac.uk/~sb317/papers/foundations_bm25_review.pdf
The per-field similarity is ignored but to be compatible each field must use
a Similarity
at index time that encodes norms the same way as
SimilarityBase.computeNorm(org.apache.lucene.index.FieldInvertState)
.Modifier and Type | Class and Description |
---|---|
static class |
BM25FQuery.Builder
A builder for
BM25FQuery . |
NULL_ACCOUNTABLE
Modifier and Type | Method and Description |
---|---|
Weight |
createWeight(IndexSearcher searcher,
ScoreMode scoreMode,
float boost) |
boolean |
equals(Object other) |
List<Term> |
getTerms() |
int |
hashCode() |
long |
ramBytesUsed() |
Query |
rewrite(IndexReader reader) |
String |
toString(String field) |
void |
visit(QueryVisitor visitor) |
classHash, sameClassAs, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getChildResources
public long ramBytesUsed()
ramBytesUsed
in interface Accountable
public Query rewrite(IndexReader reader) throws IOException
rewrite
in class Query
IOException
public void visit(QueryVisitor visitor)
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
createWeight
in class Query
IOException
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.