Enum Class SolrQueryParserBase.SynonymQueryStyle

java.lang.Object
java.lang.Enum<SolrQueryParserBase.SynonymQueryStyle>
org.apache.solr.parser.SolrQueryParserBase.SynonymQueryStyle
All Implemented Interfaces:
Serializable, Comparable<SolrQueryParserBase.SynonymQueryStyle>, Constable
Enclosing class:
SolrQueryParserBase

public static enum SolrQueryParserBase.SynonymQueryStyle extends Enum<SolrQueryParserBase.SynonymQueryStyle>
Query strategy when analyzed query terms overlap the same position (ie synonyms) consider if pants and khakis are query time synonyms

AS_SAME_TERM PICK_BEST AS_DISTINCT_TERMS

  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    each synonym scored indepedently, then added together (ie boolean query) so if "pants" has df 500, and "khakis" a df of 50, khakis matches are scored higher but summed with any "pants" matches appropriate when more specific synonyms should score higher, but we don't want to ignore less specific synonyms
    (default) synonym terms share doc freq so if "pants" has df 500, and "khakis" a df of 50, uses 500 df when scoring both terms appropriate for exact synonyms see SynonymQuery
    highest scoring term match chosen (ie dismax) so if "pants" has df 500, and "khakis" a df of 50, khakis matches are scored higher appropriate when more specific synonyms should score higher
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • AS_SAME_TERM

      public static final SolrQueryParserBase.SynonymQueryStyle AS_SAME_TERM
      (default) synonym terms share doc freq so if "pants" has df 500, and "khakis" a df of 50, uses 500 df when scoring both terms appropriate for exact synonyms see SynonymQuery
    • PICK_BEST

      public static final SolrQueryParserBase.SynonymQueryStyle PICK_BEST
      highest scoring term match chosen (ie dismax) so if "pants" has df 500, and "khakis" a df of 50, khakis matches are scored higher appropriate when more specific synonyms should score higher
    • AS_DISTINCT_TERMS

      public static final SolrQueryParserBase.SynonymQueryStyle AS_DISTINCT_TERMS
      each synonym scored indepedently, then added together (ie boolean query) so if "pants" has df 500, and "khakis" a df of 50, khakis matches are scored higher but summed with any "pants" matches appropriate when more specific synonyms should score higher, but we don't want to ignore less specific synonyms
  • Method Details

    • values

      public static SolrQueryParserBase.SynonymQueryStyle[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SolrQueryParserBase.SynonymQueryStyle valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null