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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
getCase()
If exact matching is used, this returns the terminator string which terminates an exact matched sequence in queries.int
Returns the gram size, or -1 if not set.getType()
int
hashCode()
boolean
boolean
isPrefix()
boolean
boolean
isSuffix()
boolean
maxLength
(int maxLength) void
Merge data from another matching objectvoid
setAlgorithm
(MatchAlgorithm algorithm) void
void
setExactMatchTerminator
(String exactMatchTerminator) Sets the terminator string which terminates an exact matched sequence in queries (used if type is EXACT).void
setGramSize
(int gramSize) void
toString()
-
Field Details
-
defaultType
-
-
Constructor Details
-
Matching
public Matching()Creates a matching of type "text" -
Matching
-
-
Method Details
-
getType
-
getCase
-
setType
-
setCase
-
maxLength
-
maxLength
-
isTypeUserSet
public boolean isTypeUserSet() -
getAlgorithm
-
setAlgorithm
-
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
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()
-