Class Matching

java.lang.Object
com.yahoo.schema.document.Matching
All Implemented Interfaces:
Serializable, Cloneable

public class Matching extends Object implements Cloneable, Serializable
Defines how a field should be matched. Matching objects can be compared based on their content, but they are not immutable.
Author:
bratseth
See Also:
  • Field Details

    • defaultType

      public static final MatchType defaultType
  • Constructor Details

    • Matching

      public Matching()
      Creates a matching of type "text"
    • Matching

      public Matching(MatchType type)
  • Method Details

    • getType

      public MatchType getType()
    • getCase

      public Case getCase()
    • setType

      public void setType(MatchType type)
    • setCase

      public void setCase(Case casing)
    • maxLength

      public Integer maxLength()
    • maxLength

      public Matching maxLength(int maxLength)
    • isTypeUserSet

      public boolean isTypeUserSet()
    • getAlgorithm

      public MatchAlgorithm getAlgorithm()
    • setAlgorithm

      public void setAlgorithm(MatchAlgorithm algorithm)
    • isAlgorithmUserSet

      public boolean isAlgorithmUserSet()
    • isPrefix

      public boolean isPrefix()
    • isSubstring

      public boolean isSubstring()
    • isSuffix

      public boolean isSuffix()
    • getGramSize

      public int getGramSize()
      Returns the gram size, or -1 if not set. Should only be set with gram matching.
    • setGramSize

      public void setGramSize(int gramSize)
    • merge

      public void merge(Matching m)
      Merge data from another matching object
    • getExactMatchTerminator

      public String getExactMatchTerminator()
      If exact matching is used, this returns the terminator string which terminates an exact matched sequence in queries. If exact matching is not used, or no terminator is set, this is null
    • setExactMatchTerminator

      public void setExactMatchTerminator(String exactMatchTerminator)
      Sets the terminator string which terminates an exact matched sequence in queries (used if type is EXACT).
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • clone

      public Matching clone()
      Overrides:
      clone in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object