Class NGramAnalyzerProperties
java.lang.Object
com.arangodb.entity.arangosearch.analyzer.NGramAnalyzerProperties
An Analyzer capable of producing n-grams from a specified input in a range of min..max (inclusive). Can optionally
preserve the original input.
This Analyzer type can be used to implement substring matching. Note that it slices the input based on bytes and not characters by default (streamType). The “binary” mode supports single-byte characters only; multi-byte UTF-8 characters raise an Invalid UTF-8 sequence query error.
- Author:
- Michele Rastelli
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
long
getMax()
long
getMin()
int
hashCode()
boolean
void
setEndMarker
(String endMarker) void
setMax
(long max) void
setMin
(long min) void
setPreserveOriginal
(boolean preserveOriginal) void
setStartMarker
(String startMarker) void
setStreamType
(StreamType streamType)
-
Constructor Details
-
NGramAnalyzerProperties
public NGramAnalyzerProperties()
-
-
Method Details
-
getMin
public long getMin()- Returns:
- minimum n-gram length
-
setMin
public void setMin(long min) -
getMax
public long getMax()- Returns:
- maximum n-gram length
-
setMax
public void setMax(long max) -
isPreserveOriginal
public boolean isPreserveOriginal()- Returns:
true
to include the original value as wellfalse
to produce the n-grams based on min and max only
-
setPreserveOriginal
public void setPreserveOriginal(boolean preserveOriginal) -
getStartMarker
- Returns:
- this value will be prepended to n-grams which include the beginning of the input. Can be used for matching prefixes. Choose a character or sequence as marker which does not occur in the input
-
setStartMarker
-
getEndMarker
- Returns:
- this value will be appended to n-grams which include the end of the input. Can be used for matching suffixes. Choose a character or sequence as marker which does not occur in the input.
-
setEndMarker
-
getStreamType
-
setStreamType
-
equals
-
hashCode
public int hashCode()
-