Package com.yahoo.schema.document
Class Matching
java.lang.Object
com.yahoo.schema.document.Matching
- All Implemented Interfaces:
Serializable,Cloneable
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleangetCase()If exact matching is used, this returns the terminator string which terminates an exact matched sequence in queries.Returns the gram size, or empty if not set.getType()inthashCode()booleanbooleanisPrefix()booleanbooleanisSuffix()booleanmaxLength(int maxLength) maxTermOccurrences(int maxTermOccurrences) maxTokenLength(int maxTokenLength) voidMerge data from another matching objectvoidsetAlgorithm(MatchAlgorithm algorithm) voidsetExactMatchTerminator(String exactMatchTerminator) Sets the terminator string which terminates an exact matched sequence in queries (used if type is EXACT).voidsetGramSize(int gramSize) toString()
-
Field Details
-
defaultType
-
-
Constructor Details
-
Matching
public Matching()Creates a matching of type "text" -
Matching
-
-
Method Details
-
getType
-
getCase
-
setType
-
setCase
-
maxLength
-
maxLength
-
maxTermOccurrences
-
maxTermOccurrences
-
maxTokenLength
-
maxTokenLength
-
isTypeUserSet
public boolean isTypeUserSet() -
getAlgorithm
-
setAlgorithm
-
isAlgorithmUserSet
public boolean isAlgorithmUserSet() -
isPrefix
public boolean isPrefix() -
isSubstring
public boolean isSubstring() -
isSuffix
public boolean isSuffix() -
getGramSize
Returns the gram size, or empty if not set. Should only be set with gram matching. -
setGramSize
public void setGramSize(int gramSize) -
merge
Merge data from another matching object -
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
Sets the terminator string which terminates an exact matched sequence in queries (used if type is EXACT). -
toString
-
clone
-
equals
-
hashCode
public int hashCode()
-