Class LegacyBM25SimilarityFactory

  • public class LegacyBM25SimilarityFactory
    extends SimilarityFactory
    Factory for LegacyBM25Similarity. Use this to force explicit creation of the BM25 formula that was used by BM25Similarity before Solr/Lucene 8.0.0. Note that SchemaSimilarityFactory will automatically create an instance of LegacyBM25Similarity if luceneMatchVersion is < 8.0.0


    • k1 (float): Controls non-linear term frequency normalization (saturation). The default is 1.2
    • b (float): Controls to what degree document length normalizes tf values. The default is 0.75

    Optional settings:

    • discountOverlaps (bool): Sets LegacyBM25Similarity.setDiscountOverlaps(boolean)
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Constructor Detail

      • LegacyBM25SimilarityFactory

        public LegacyBM25SimilarityFactory()