Package org.apache.lucene.search
Class BM25FQuery
- java.lang.Object
- 
- org.apache.lucene.search.Query
- 
- org.apache.lucene.search.BM25FQuery
 
 
- 
- All Implemented Interfaces:
- Accountable
 
 public final class BM25FQuery extends Query implements Accountable AQuerythat 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 aSimilarityat index time that encodes norms the same way asSimilarityBase.computeNorm(org.apache.lucene.index.FieldInvertState).- WARNING: This API is experimental and might change in incompatible ways in the next release.
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classBM25FQuery.BuilderA builder forBM25FQuery.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description WeightcreateWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)booleanequals(Object other)List<Term>getTerms()inthashCode()longramBytesUsed()Queryrewrite(IndexReader reader)StringtoString(String field)voidvisit(QueryVisitor visitor)- 
Methods inherited from class org.apache.lucene.search.QueryclassHash, sameClassAs, toString
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.apache.lucene.util.AccountablegetChildResources
 
- 
 
- 
- 
- 
Method Detail- 
ramBytesUsedpublic long ramBytesUsed() - Specified by:
- ramBytesUsedin interface- Accountable
 
 - 
rewritepublic Query rewrite(IndexReader reader) throws IOException - Overrides:
- rewritein class- Query
- Throws:
- IOException
 
 - 
visitpublic void visit(QueryVisitor visitor) 
 - 
createWeightpublic Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException - Overrides:
- createWeightin class- Query
- Throws:
- IOException
 
 
- 
 
-