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

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

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

Analyzer.attributeFactory介绍

[英]Return the AttributeFactory to be used for #tokenStream and #normalize(String,String) on the given FieldName. The default implementation returns TokenStream#DEFAULT_TOKEN_ATTRIBUTE_FACTORY.
[中]返回用于给定字段名上的#tokenStream和#normalize(String,String)的AttributeFactory。默认实现返回TokenStream#default _TOKEN _ATTRIBUTE _FACTORY。

代码示例

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

@Override
 protected final AttributeFactory attributeFactory(String fieldName) {
  return getWrappedAnalyzer(fieldName).attributeFactory(fieldName);
 }
}

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

final AttributeFactory attributeFactory = attributeFactory(fieldName);
try (TokenStream ts = normalize(fieldName,
  new StringTokenStream(attributeFactory, filteredText, text.length()))) {

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

@Override
 protected final AttributeFactory attributeFactory(String fieldName) {
  return getWrappedAnalyzer(fieldName).attributeFactory(fieldName);
 }
}

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

final AttributeFactory attributeFactory = attributeFactory(fieldName);
try (TokenStream ts = normalize(fieldName,
  new StringTokenStream(attributeFactory, filteredText, text.length()))) {

相关文章