Java Code Examples for org.elasticsearch.index.analysis.Analysis#parseStopWords()

The following examples show how to use org.elasticsearch.index.analysis.Analysis#parseStopWords() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PortugueseAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
PortugueseAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new PortugueseAnalyzer(
        Analysis.parseStopWords(env, settings, PortugueseAnalyzer.getDefaultStopSet()),
        Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
    );
    analyzer.setVersion(version);
}
 
Example 2
Source File: ItalianAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
ItalianAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new ItalianAnalyzer(
        Analysis.parseStopWords(env, settings, ItalianAnalyzer.getDefaultStopSet()),
        Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
    );
    analyzer.setVersion(version);
}
 
Example 3
Source File: LithuanianAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
LithuanianAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new LithuanianAnalyzer(
        Analysis.parseStopWords(env, settings, LithuanianAnalyzer.getDefaultStopSet()),
        Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
    );
    analyzer.setVersion(version);
}
 
Example 4
Source File: EnglishAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
EnglishAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new EnglishAnalyzer(
        Analysis.parseStopWords(env, settings, EnglishAnalyzer.getDefaultStopSet()),
        Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
    );
    analyzer.setVersion(version);
}
 
Example 5
Source File: GermanAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
GermanAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new GermanAnalyzer(
        Analysis.parseStopWords(env, settings, GermanAnalyzer.getDefaultStopSet()),
        Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
    );
    analyzer.setVersion(version);
}
 
Example 6
Source File: FingerprintAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
FingerprintAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);

    char separator = parseSeparator(settings);
    int maxOutputSize = settings.getAsInt(MAX_OUTPUT_SIZE.getPreferredName(),DEFAULT_MAX_OUTPUT_SIZE);
    CharArraySet stopWords = Analysis.parseStopWords(env, settings, DEFAULT_STOP_WORDS);

    this.analyzer = new FingerprintAnalyzer(stopWords, separator, maxOutputSize);
}
 
Example 7
Source File: HindiAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
HindiAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new HindiAnalyzer(
        Analysis.parseStopWords(env, settings, HindiAnalyzer.getDefaultStopSet()),
        Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
    );
    analyzer.setVersion(version);
}
 
Example 8
Source File: TurkishAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
TurkishAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new TurkishAnalyzer(
        Analysis.parseStopWords(env, settings, TurkishAnalyzer.getDefaultStopSet()),
        Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
    );
    analyzer.setVersion(version);
}
 
Example 9
Source File: DanishAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
DanishAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new DanishAnalyzer(
        Analysis.parseStopWords(env, settings, DanishAnalyzer.getDefaultStopSet()),
        Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
    );
    analyzer.setVersion(version);
}
 
Example 10
Source File: RussianAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
RussianAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new RussianAnalyzer(
        Analysis.parseStopWords(env, settings, RussianAnalyzer.getDefaultStopSet()),
        Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
    );
    analyzer.setVersion(version);
}
 
Example 11
Source File: SoraniAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
SoraniAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new SoraniAnalyzer(
        Analysis.parseStopWords(env, settings, SoraniAnalyzer.getDefaultStopSet()),
        Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
    );
    analyzer.setVersion(version);
}
 
Example 12
Source File: SwedishAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
SwedishAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new SwedishAnalyzer(
        Analysis.parseStopWords(env, settings, SwedishAnalyzer.getDefaultStopSet()),
        Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
    );
    analyzer.setVersion(version);
}
 
Example 13
Source File: SnowballAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
SnowballAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);

    String language = settings.get("language", settings.get("name", "English"));
    CharArraySet defaultStopwords = DEFAULT_LANGUAGE_STOPWORDS.getOrDefault(language, CharArraySet.EMPTY_SET);
    CharArraySet stopWords = Analysis.parseStopWords(env, settings, defaultStopwords);

    analyzer = new SnowballAnalyzer(language, stopWords);
    analyzer.setVersion(version);
}
 
Example 14
Source File: BulgarianAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
BulgarianAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new BulgarianAnalyzer(
        Analysis.parseStopWords(env, settings, BulgarianAnalyzer.getDefaultStopSet()),
        Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
    );
    analyzer.setVersion(version);
}
 
Example 15
Source File: CzechAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
CzechAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new CzechAnalyzer(
        Analysis.parseStopWords(env, settings, CzechAnalyzer.getDefaultStopSet()),
        Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
    );
    analyzer.setVersion(version);
}
 
Example 16
Source File: CatalanAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
CatalanAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new CatalanAnalyzer(
        Analysis.parseStopWords(env, settings, CatalanAnalyzer.getDefaultStopSet()),
        Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
    );
    analyzer.setVersion(version);
}
 
Example 17
Source File: BasqueAnalyzerProvider.java    From crate with Apache License 2.0 5 votes vote down vote up
BasqueAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new BasqueAnalyzer(
        Analysis.parseStopWords(env, settings, BasqueAnalyzer.getDefaultStopSet()),
        Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
    );
    analyzer.setVersion(version);
}
 
Example 18
Source File: PersianAnalyzerProvider.java    From crate with Apache License 2.0 4 votes vote down vote up
PersianAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new PersianAnalyzer(Analysis.parseStopWords(env, settings, PersianAnalyzer.getDefaultStopSet()));
    analyzer.setVersion(version);
}
 
Example 19
Source File: ThaiAnalyzerProvider.java    From crate with Apache License 2.0 4 votes vote down vote up
ThaiAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new ThaiAnalyzer(
        Analysis.parseStopWords(env, settings, ThaiAnalyzer.getDefaultStopSet()));
    analyzer.setVersion(version);
}
 
Example 20
Source File: GreekAnalyzerProvider.java    From crate with Apache License 2.0 4 votes vote down vote up
GreekAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new GreekAnalyzer(Analysis.parseStopWords(env, settings, GreekAnalyzer.getDefaultStopSet()));
    analyzer.setVersion(version);
}