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 booleanequals(Object o)StringgetEndMarker()longgetMax()longgetMin()StringgetStartMarker()StreamTypegetStreamType()inthashCode()booleanisPreserveOriginal()voidsetEndMarker(String endMarker)voidsetMax(long max)voidsetMin(long min)voidsetPreserveOriginal(boolean preserveOriginal)voidsetStartMarker(String startMarker)voidsetStreamType(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:
trueto include the original value as wellfalseto 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)
-
-