本文整理了Java中org.apache.lucene.analysis.Analyzer.setVersion()
方法的一些代码示例,展示了Analyzer.setVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Analyzer.setVersion()
方法的具体详情如下:
包路径:org.apache.lucene.analysis.Analyzer
类名称:Analyzer
方法名:setVersion
[英]Set the version of Lucene this analyzer should mimic the behavior for for analysis.
[中]设置Lucene的版本此分析器应模拟用于分析的行为。
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
final Analyzer a = new StandardAnalyzer(CharArraySet.EMPTY_SET);
a.setVersion(version.luceneVersion);
return a;
}
},
代码示例来源:origin: org.elasticsearch/elasticsearch
public PreBuiltAnalyzerProviderFactory(String name, PreBuiltCacheFactory.CachingStrategy cache, Supplier<Analyzer> create) {
super(name, cache);
this.create = version -> create.get();
Analyzer analyzer = create.get();
analyzer.setVersion(Version.CURRENT.luceneVersion);
this.current = new PreBuiltAnalyzerProvider(name, AnalyzerScope.INDICES, analyzer);
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new ClassicAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
};
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new StopAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
},
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new WhitespaceAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
},
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new SimpleAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
},
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
protected AnalyzerProvider<?> create(Version version) {
assert Version.CURRENT.equals(version) == false;
Analyzer analyzer = create.apply(version);
analyzer.setVersion(version.luceneVersion);
return new PreBuiltAnalyzerProvider(getName(), AnalyzerScope.INDICES, analyzer);
}
代码示例来源:origin: org.elasticsearch/elasticsearch
/**
* This constructor only exists to expose analyzers defined in {@link PreBuiltAnalyzers} as {@link PreBuiltAnalyzerProviderFactory}.
*/
PreBuiltAnalyzerProviderFactory(String name, PreBuiltAnalyzers preBuiltAnalyzer) {
super(name, new PreBuiltAnalyzersDelegateCache(name, preBuiltAnalyzer));
this.create = preBuiltAnalyzer::getAnalyzer;
Analyzer analyzer = preBuiltAnalyzer.getAnalyzer(Version.CURRENT);
analyzer.setVersion(Version.CURRENT.luceneVersion);
current = new PreBuiltAnalyzerProvider(name, AnalyzerScope.INDICES, analyzer);
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new SimpleAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
},
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new ClassicAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
},
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new BulgarianAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
},
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new FrenchAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
},
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new LithuanianAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
},
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new NorwegianAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
},
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new PortugueseAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
},
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new RomanianAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
},
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new ArmenianAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
},
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new BrazilianAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
},
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new SoraniAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
},
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
protected Analyzer create(Version version) {
Analyzer a = new ThaiAnalyzer();
a.setVersion(version.luceneVersion);
return a;
}
};
内容来源于网络,如有侵权,请联系作者删除!