Uses of Class org.apache.lucene.search.similarities.Similarity (Lucene 10.5.1 core API)
Description: use: package: org.apache.lucene.search.similarities, class: Similarity

# Uses of Class
org.apache.lucene.search.similarities.Similarity

Packages that use Similarity
Package
Description
org.apache.lucene.index
Code to maintain and access indices.
org.apache.lucene.search
Code to search indices.
org.apache.lucene.search.similarities
This package contains the various ranking models that can be used in Lucene.

- ## Uses of Similarity in org.apache.lucene.index

  Fields in org.apache.lucene.index declared as Similarity
  Modifier and Type
  Field
  Description
  `protected Similarity`
  LiveIndexWriterConfig.`similarity`
  `Similarity` to use when encoding norms.
  Methods in org.apache.lucene.index that return Similarity
  Modifier and Type
  Method
  Description
  `Similarity`
  IndexWriterConfig.`getSimilarity()`
  `Similarity`
  LiveIndexWriterConfig.`getSimilarity()`
  Expert: returns the `Similarity` implementation used by this `IndexWriter`.
  Methods in org.apache.lucene.index with parameters of type Similarity
  Modifier and Type
  Method
  Description
  `IndexWriterConfig`
  IndexWriterConfig.`setSimilarity(Similarity similarity)`
  Expert: set the `Similarity` implementation used by this IndexWriter.

- ## Uses of Similarity in org.apache.lucene.search

  Methods in org.apache.lucene.search that return Similarity
  Modifier and Type
  Method
  Description
  `static Similarity`
  IndexSearcher.`getDefaultSimilarity()`
  Expert: returns a default Similarity instance.
  `Similarity`
  IndexSearcher.`getSimilarity()`
  Expert: Get the `Similarity` to use to compute scores.
  Methods in org.apache.lucene.search with parameters of type Similarity
  Modifier and Type
  Method
  Description
  `void`
  IndexSearcher.`setSimilarity(Similarity similarity)`
  Expert: Set the Similarity implementation used by this IndexSearcher.

- ## Uses of Similarity in org.apache.lucene.search.similarities

  Subclasses of Similarity in org.apache.lucene.search.similarities
  Modifier and Type
  Class
  Description
  `class`
  `Axiomatic`
  Axiomatic approaches for IR.
  `class`
  `AxiomaticF1EXP`
  F1EXP is defined as Sum(tf(term_doc_freq)*ln(docLen)*IDF(term)) where IDF(t) = pow((N+1)/df(t), k) N=total num of docs, df=doc freq
  `class`
  `AxiomaticF1LOG`
  F1LOG is defined as Sum(tf(term_doc_freq)*ln(docLen)*IDF(term)) where IDF(t) = ln((N+1)/df(t)) N=total num of docs, df=doc freq
  `class`
  `AxiomaticF2EXP`
  F2EXP is defined as Sum(tfln(term_doc_freq, docLen)*IDF(term)) where IDF(t) = pow((N+1)/df(t), k) N=total num of docs, df=doc freq
  `class`
  `AxiomaticF2LOG`
  F2EXP is defined as Sum(tfln(term_doc_freq, docLen)*IDF(term)) where IDF(t) = ln((N+1)/df(t)) N=total num of docs, df=doc freq
  `class`
  `AxiomaticF3EXP`
  F3EXP is defined as Sum(tf(term_doc_freq)*IDF(term)-gamma(docLen, queryLen)) where IDF(t) = pow((N+1)/df(t), k) N=total num of docs, df=doc freq gamma(docLen, queryLen) = (docLen-queryLen)*queryLen*s/avdl NOTE: the gamma function of this similarity creates negative scores
  `class`
  `AxiomaticF3LOG`
  F3EXP is defined as Sum(tf(term_doc_freq)*IDF(term)-gamma(docLen, queryLen)) where IDF(t) = ln((N+1)/df(t)) N=total num of docs, df=doc freq gamma(docLen, queryLen) = (docLen-queryLen)*queryLen*s/avdl NOTE: the gamma function of this similarity creates negative scores
  `class`
  `BM25Similarity`
  BM25 Similarity.
  `class`
  `BooleanSimilarity`
  Simple similarity that gives terms a score that is equal to their query boost.
  `class`
  `ClassicSimilarity`
  Expert: Historical scoring implementation.
  `class`
  `DFISimilarity`
  Implements the Divergence from Independence (DFI) model based on Chi-square statistics (i.e., standardized Chi-squared distance from independence in term frequency tf).
  `class`
  `DFRSimilarity`
  Implements the divergence from randomness (DFR) framework introduced in Gianni Amati and Cornelis Joost Van Rijsbergen.
  `class`
  `IBSimilarity`
  Provides a framework for the family of information-based models, as described in Stéphane Clinchant and Eric Gaussier.
  `class`
  `IndriDirichletSimilarity`
  Bayesian smoothing using Dirichlet priors as implemented in the Indri Search engine (http://www.lemurproject.org/indri.php).
  `class`
  `LMDirichletSimilarity`
  Bayesian smoothing using Dirichlet priors.
  `class`
  `LMJelinekMercerSimilarity`
  Language model based on the Jelinek-Mercer smoothing method.
  `class`
  `LMSimilarity`
  Abstract superclass for language modeling Similarities.
  `class`
  `MultiSimilarity`
  Implements the CombSUM method for combining evidence from multiple similarity values described in: Joseph A.
  `class`
  `PerFieldSimilarityWrapper`
  Provides the ability to use a different `Similarity` for different fields.
  `class`
  `RawTFSimilarity`
  Similarity that returns the raw TF as score.
  `class`
  `SimilarityBase`
  A subclass of `Similarity` that provides a simplified API for its descendants.
  `class`
  `TFIDFSimilarity`
  Implementation of `Similarity` with the Vector Space Model.
  Fields in org.apache.lucene.search.similarities declared as Similarity
  Modifier and Type
  Field
  Description
  `protected final Similarity[]`
  MultiSimilarity.`sims`
  the sub-similarities used to create the combined score
  Methods in org.apache.lucene.search.similarities that return Similarity
  Modifier and Type
  Method
  Description
  `abstract Similarity`
  PerFieldSimilarityWrapper.`get(String name)`
  Returns a `Similarity` for scoring a field.
  Constructors in org.apache.lucene.search.similarities with parameters of type Similarity
  Modifier
  Constructor
  Description
  ``
  `MultiSimilarity(Similarity[] sims)`
  Creates a MultiSimilarity which will sum the scores of the provided `sims`.