org.apache.solr.search.similarities

## Class ClassicSimilarityFactory

- java.lang.Object
- - org.apache.solr.schema.SimilarityFactory
  - - org.apache.solr.search.similarities.ClassicSimilarityFactory

- Direct Known Subclasses:
    SweetSpotSimilarityFactory

      public class ClassicSimilarityFactory
      extends SimilarityFactory

  Factory for `ClassicSimilarity`

  ClassicSimilarity is Lucene's original scoring implementation, based upon the Vector Space Model.

  Optional settings:

  - discountOverlaps (bool): Sets `ClassicSimilarity.setDiscountOverlaps(boolean)`
  See Also:
    `TFIDFSimilarity`
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DISCOUNT_OVERLAPS` Init param name for specifying the value to use in `ClassicSimilarity.setDiscountOverlaps(boolean)`
    `protected boolean` | `discountOverlaps` Controls the value of `ClassicSimilarity.setDiscountOverlaps(boolean)` on newly constructed instances of `ClassicSimilarity`

    - ### Fields inherited from class org.apache.solr.schema.SimilarityFactory

      `CLASS_NAME, params`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClassicSimilarityFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Similarity` | `getSimilarity()`
    `void` | `init(SolrParams params)`

    - ### Methods inherited from class org.apache.solr.schema.SimilarityFactory

      `getClassArg, getNamedPropertyValues, getParams`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DISCOUNT_OVERLAPS

          public static final String DISCOUNT_OVERLAPS

      Init param name for specifying the value to use in `ClassicSimilarity.setDiscountOverlaps(boolean)`
      See Also:
        Constant Field Values

    - #### discountOverlaps

          protected boolean discountOverlaps

      Controls the value of `ClassicSimilarity.setDiscountOverlaps(boolean)` on newly constructed instances of `ClassicSimilarity`

  - ### Constructor Detail

    - #### ClassicSimilarityFactory

          public ClassicSimilarityFactory()

  - ### Method Detail

    - #### init

          public void init(SolrParams params)

      Overrides:
        `init` in class `SimilarityFactory`

    - #### getSimilarity

          public Similarity getSimilarity()

      Specified by:
        `getSimilarity` in class `SimilarityFactory`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.