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

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

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

Analyzer.initReader介绍

[英]Override this if you want to add a CharFilter chain.

The default implementation returns reader unchanged.
[中]如果要添加CharFilter链,请重写此选项。
默认实现返回reader不变。

代码示例

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

@Override
public final Reader initReader(String fieldName, Reader reader) {
 return getWrappedAnalyzer(fieldName).initReader(fieldName, wrapReader(fieldName, reader));
}

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

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

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

new ReusableStringReader() : components.reusableStringReader;
strReader.setValue(text);
final Reader r = initReader(fieldName, strReader);
if (components == null) {
 components = createComponents(fieldName);

代码示例来源:origin: NarimanN2/ParsiAnalyzer

@Override
protected Reader initReader(String fieldName, Reader reader) {
  reader = super.initReader(fieldName, reader);
  CharFilter charFilter = new ZeroWidthNonJoinerCharFilter(reader);
  return charFilter;
}

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

@Override
 public final Reader initReader(String fieldName, Reader reader) {
  return getWrappedAnalyzer(fieldName).initReader(fieldName, reader);
 }
}

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

@Override
public final Reader initReader(String fieldName, Reader reader) {
 return getWrappedAnalyzer(fieldName).initReader(fieldName, wrapReader(fieldName, reader));
}

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

@Override
 public final Reader initReader(String fieldName, Reader reader) {
  return getWrappedAnalyzer(fieldName).initReader(fieldName, wrapReader(fieldName, reader));
 }
}

代码示例来源: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 reader) {
TokenStreamComponents components = reuseStrategy.getReusableComponents(this, fieldName);
final Reader r = initReader(fieldName, reader);
if (components == null) {
 components = createComponents(fieldName);

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

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

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

new ReusableStringReader() : components.reusableStringReader;
strReader.setValue(text);
final Reader r = initReader(fieldName, strReader);
if (components == null) {
 components = createComponents(fieldName);

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

new ReusableStringReader() : components.reusableStringReader;
strReader.setValue(text);
final Reader r = initReader(fieldName, strReader);
if (components == null) {
 components = createComponents(fieldName);

相关文章