org.apache.lucene.analysis.Analyzer.createComponents()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(192)

本文整理了Java中org.apache.lucene.analysis.Analyzer.createComponents()方法的一些代码示例,展示了Analyzer.createComponents()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Analyzer.createComponents()方法的具体详情如下:
包路径:org.apache.lucene.analysis.Analyzer
类名称:Analyzer
方法名:createComponents

Analyzer.createComponents介绍

[英]Creates a new TokenStreamComponents instance for this analyzer.
[中]为此分析器创建新的TokenStreamComponents实例。

代码示例

代码示例来源:origin: org.apache.lucene/lucene-core

@Override
protected final TokenStreamComponents createComponents(String fieldName) {
 return wrapComponents(fieldName, getWrappedAnalyzer(fieldName).createComponents(fieldName));
}

代码示例来源:origin: org.apache.lucene/lucene-core

final Reader r = initReader(fieldName, reader);
if (components == null) {
 components = createComponents(fieldName);
 reuseStrategy.setReusableComponents(this, fieldName, components);

代码示例来源:origin: org.apache.lucene/lucene-core

final Reader r = initReader(fieldName, strReader);
if (components == null) {
 components = createComponents(fieldName);
 reuseStrategy.setReusableComponents(this, fieldName, components);

代码示例来源:origin: org.infinispan/infinispan-embedded-query

@Override
protected final TokenStreamComponents createComponents(String fieldName) {
 return wrapComponents(fieldName, getWrappedAnalyzer(fieldName).createComponents(fieldName));
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

@Override
protected final TokenStreamComponents createComponents(String fieldName) {
 return wrapComponents(fieldName, getWrappedAnalyzer(fieldName).createComponents(fieldName));
}

代码示例来源:origin: gncloud/fastcatsearch

@Override
protected final TokenStreamComponents createComponents(String fieldName, Reader aReader) {
 return wrapComponents(fieldName, getWrappedAnalyzer(fieldName).createComponents(fieldName, aReader));
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

@Override
protected TokenStreamComponents createComponents(String fieldName) {
  TokenStreamComponents createComponents = analyzer.createComponents(fieldName);
  TokenStream stream = new PrefixTokenFilter(createComponents.getTokenStream(), separator, prefix);
  TokenStreamComponents tsc = new TokenStreamComponents(createComponents.getTokenizer(), stream);
  return tsc;
}

代码示例来源:origin: gncloud/fastcatsearch

public final TokenStream tokenStream(final String fieldName,
                   final Reader reader, AnalyzerOption analyzerOption) throws IOException {
 TokenStreamComponents components = reuseStrategy.getReusableComponents(fieldName);
 
 final Reader r = initReader(fieldName, reader);
 if (components == null) {
  components = createComponents(fieldName, r);
  reuseStrategy.setReusableComponents(fieldName, components);
 } else {
  components.setReader(r);
 }
 components.setAnalyzerOption(analyzerOption);
 
 return components.getTokenStream();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

final Reader r = initReader(fieldName, reader);
if (components == null) {
 components = createComponents(fieldName);
 reuseStrategy.setReusableComponents(this, fieldName, components);

代码示例来源:origin: org.infinispan/infinispan-embedded-query

final Reader r = initReader(fieldName, reader);
if (components == null) {
 components = createComponents(fieldName);
 reuseStrategy.setReusableComponents(this, fieldName, components);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

final Reader r = initReader(fieldName, strReader);
if (components == null) {
 components = createComponents(fieldName);
 reuseStrategy.setReusableComponents(this, fieldName, components);

代码示例来源:origin: org.infinispan/infinispan-embedded-query

final Reader r = initReader(fieldName, strReader);
if (components == null) {
 components = createComponents(fieldName);
 reuseStrategy.setReusableComponents(this, fieldName, components);

相关文章