Class NGramAnalyzerProperties
- java.lang.Object
-
- com.arangodb.entity.arangosearch.analyzer.NGramAnalyzerProperties
-
public final class NGramAnalyzerProperties extends Object
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:
- API Documentation
-
-
Constructor Summary
Constructors Constructor Description NGramAnalyzerProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getEndMarker()
long
getMax()
long
getMin()
String
getStartMarker()
StreamType
getStreamType()
int
hashCode()
boolean
isPreserveOriginal()
void
setEndMarker(String endMarker)
void
setMax(long max)
void
setMin(long min)
void
setPreserveOriginal(boolean preserveOriginal)
void
setStartMarker(String startMarker)
void
setStreamType(StreamType streamType)
-
-
-
Method Detail
-
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
public String 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
public void setStartMarker(String startMarker)
-
getEndMarker
public String 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
public void setEndMarker(String endMarker)
-
getStreamType
public StreamType getStreamType()
-
setStreamType
public void setStreamType(StreamType streamType)
-
-