public class TextAnalyzerProperties extends Object
Constructor and Description |
---|
TextAnalyzerProperties() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
SearchAnalyzerCase |
getAnalyzerCase() |
EdgeNgram |
getEdgeNgram() |
String |
getLocale() |
List<String> |
getStopwords() |
String |
getStopwordsPath() |
int |
hashCode() |
boolean |
isAccent() |
boolean |
isStemming() |
void |
setAccent(boolean accent) |
void |
setAnalyzerCase(SearchAnalyzerCase analyzerCase) |
void |
setEdgeNgram(EdgeNgram edgeNgram) |
void |
setLocale(String locale) |
void |
setStemming(boolean stemming) |
void |
setStopwords(List<String> stopwords) |
void |
setStopwordsPath(String stopwordsPath) |
public String getLocale()
public void setLocale(String locale)
public boolean isAccent()
true
to preserve accented characters (default)
false
to convert accented characters to their base characterspublic void setAccent(boolean accent)
public SearchAnalyzerCase getAnalyzerCase()
public void setAnalyzerCase(SearchAnalyzerCase analyzerCase)
public boolean isStemming()
true
to apply stemming on returned words (default)
false
to leave the tokenized words as-ispublic void setStemming(boolean stemming)
public EdgeNgram getEdgeNgram()
SearchAnalyzerCase.lower
- stemming: falsepublic void setEdgeNgram(EdgeNgram edgeNgram)
public List<String> getStopwords()
public String getStopwordsPath()
Default: if no path is provided then the value of the environment variable IRESEARCH_TEXT_STOPWORD_PATH is used to determine the path, or if it is undefined then the current working directory is assumed. If the stopwords attribute is provided then no stop-words are loaded from files, unless an explicit stopwordsPath is also provided.
Note that if the stopwordsPath can not be accessed, is missing language sub-directories or has no files for a language required by an Analyzer, then the creation of a new Analyzer is refused. If such an issue is discovered for an existing Analyzer during startup then the server will abort with a fatal error.
public void setStopwordsPath(String stopwordsPath)
Copyright © 2016–2021 ArangoDB GmbH. All rights reserved.