Search in sources :

Example 1 with IndependenceChiSquared

use of org.apache.lucene.search.similarities.IndependenceChiSquared in project lucene-solr by apache.

the class TestDFISimilarityFactory method test.

/**
   * dfi with no parameters
   */
public void test() throws Exception {
    Similarity sim = getSimilarity("text");
    assertEquals(DFISimilarity.class, sim.getClass());
    DFISimilarity dfi = (DFISimilarity) sim;
    assertTrue(dfi.getDiscountOverlaps());
    assertTrue(dfi.getIndependence() instanceof IndependenceChiSquared);
}
Also used : DFISimilarity(org.apache.lucene.search.similarities.DFISimilarity) Similarity(org.apache.lucene.search.similarities.Similarity) DFISimilarity(org.apache.lucene.search.similarities.DFISimilarity) IndependenceChiSquared(org.apache.lucene.search.similarities.IndependenceChiSquared)

Aggregations

DFISimilarity (org.apache.lucene.search.similarities.DFISimilarity)1 IndependenceChiSquared (org.apache.lucene.search.similarities.IndependenceChiSquared)1 Similarity (org.apache.lucene.search.similarities.Similarity)1