Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8329

SchemaSimilarityFactory should support a config option for the defaultSimilarity

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      SchemaSimilarityFactory has an implicit default Similarity instance that it uses for any fieldTypes that don't define their own – we should make this default configurable.


      Example of how to use this new option from the javadocs...

         <similarity class="solr.SchemaSimilarityFactory" >
           <str name="defaultSimFromFieldType">type-using-custom-dfr</str>
         </similarity>
         ...
         <fieldType name="type-using-custom-dfr" class="solr.TextField">
           ...
           <similarity class="solr.DFRSimilarityFactory">
             <str name="basicModel">I(F)</str>
             <str name="afterEffect">B</str>
             <str name="normalization">H3</str>
             <float name="mu">900</float>
           </similarity>
         </fieldType>
       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hossman Hoss Man
                Reporter:
                hossman Hoss Man
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: