当前位置: 首页>>代码示例>>Java>>正文


Java MultiFields.getIndexedFields方法代码示例

本文整理汇总了Java中org.apache.lucene.index.MultiFields.getIndexedFields方法的典型用法代码示例。如果您正苦于以下问题:Java MultiFields.getIndexedFields方法的具体用法?Java MultiFields.getIndexedFields怎么用?Java MultiFields.getIndexedFields使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.lucene.index.MultiFields的用法示例。


在下文中一共展示了MultiFields.getIndexedFields方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: like

import org.apache.lucene.index.MultiFields; //导入方法依赖的package包/类
/**
 * Return a query that will return docs like the passed lucene document ID.
 *
 * @param docNum the documentID of the lucene doc to generate the 'More Like This" query for.
 * @return a query that will return docs like the passed lucene document ID.
 */
public Query like(int docNum) throws IOException {
    if (fieldNames == null) {
        // gather list of valid fields from lucene
        Collection<String> fields = MultiFields.getIndexedFields(ir);
        fieldNames = fields.toArray(new String[fields.size()]);
    }

    return createQuery(retrieveTerms(docNum));
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:16,代码来源:XMoreLikeThis.java

示例2: like

import org.apache.lucene.index.MultiFields; //导入方法依赖的package包/类
/**
 * Return a query that will return docs like the passed lucene document ID.
 *
 * @param docNum
 *          the documentID of the lucene doc to generate the 'More Like This"
 *          query for.
 * @return a query that will return docs like the passed lucene document ID.
 */
public Query like(int docNum) throws IOException
{
  if (fieldNames == null) {
    // gather list of valid fields from lucene
    Collection<String> fields = MultiFields.getIndexedFields(ir);
    fieldNames = fields.toArray(new String[fields.size()]);
  }

  return createQuery(retrieveTerms(docNum));
}
 
开发者ID:oeuvres,项目名称:Alix,代码行数:19,代码来源:MoreLikeThis.java

示例3: like

import org.apache.lucene.index.MultiFields; //导入方法依赖的package包/类
/**
 * Return a query that will return docs like the passed lucene document ID.
 *
 * @param docNum the documentID of the lucene doc to generate the 'More Like This" query for.
 * @return a query that will return docs like the passed lucene document ID.
 */
public Query like(int docNum) throws IOException {
  if (fieldNames == null) {
    // gather list of valid fields from lucene
    Collection<String> fields = MultiFields.getIndexedFields(ir);
    fieldNames = fields.toArray(new String[fields.size()]);
  }

  return createQuery(retrieveTerms(docNum));
}
 
开发者ID:europeana,项目名称:search,代码行数:16,代码来源:MoreLikeThis.java

示例4: getFieldNames

import org.apache.lucene.index.MultiFields; //导入方法依赖的package包/类
private String[] getFieldNames(IndexReader ir) {
    if (fieldNames == null) {
        // gather list of all valid fields from lucene, if none specified
        Collection<String> fields = MultiFields.getIndexedFields(ir);
        fieldNames = fields.toArray(new String[fields.size()]);
    }

    return fieldNames;
}
 
开发者ID:DiceTechJobs,项目名称:SolrPlugins,代码行数:10,代码来源:FilterSuggesterComponent.java

示例5: QueryAutoStopWordAnalyzer

import org.apache.lucene.index.MultiFields; //导入方法依赖的package包/类
/**
 * Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all
 * indexed fields from terms with a document frequency greater than the given
 * maxDocFreq
 *
 * @param delegate Analyzer whose TokenStream will be filtered
 * @param indexReader IndexReader to identify the stopwords from
 * @param maxDocFreq Document frequency terms should be above in order to be stopwords
 * @throws IOException Can be thrown while reading from the IndexReader
 */
public QueryAutoStopWordAnalyzer(
    Analyzer delegate,
    IndexReader indexReader,
    int maxDocFreq) throws IOException {
  this(delegate, indexReader, MultiFields.getIndexedFields(indexReader), maxDocFreq);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:17,代码来源:QueryAutoStopWordAnalyzer.java

示例6: QueryAutoStopWordAnalyzer

import org.apache.lucene.index.MultiFields; //导入方法依赖的package包/类
/**
 * Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all
 * indexed fields from terms with a document frequency greater than the given
 * maxDocFreq
 *
 * @param matchVersion Version to be used in {@link StopFilter}
 * @param delegate Analyzer whose TokenStream will be filtered
 * @param indexReader IndexReader to identify the stopwords from
 * @param maxDocFreq Document frequency terms should be above in order to be stopwords
 * @throws IOException Can be thrown while reading from the IndexReader
 */
public QueryAutoStopWordAnalyzer(
    Version matchVersion,
    Analyzer delegate,
    IndexReader indexReader,
    int maxDocFreq) throws IOException {
  this(matchVersion, delegate, indexReader, MultiFields.getIndexedFields(indexReader), maxDocFreq);
}
 
开发者ID:pkarmstr,项目名称:NYBC,代码行数:19,代码来源:QueryAutoStopWordAnalyzer.java


注:本文中的org.apache.lucene.index.MultiFields.getIndexedFields方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。