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


Java FacetsConfig.DEFAULT_INDEX_FIELD_NAME属性代码示例

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


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

示例1: DefaultSortedSetDocValuesReaderState

/** Creates this, pulling doc values from the default {@link
 *  FacetsConfig#DEFAULT_INDEX_FIELD_NAME}. */ 
public DefaultSortedSetDocValuesReaderState(IndexReader reader) throws IOException {
  this(reader, FacetsConfig.DEFAULT_INDEX_FIELD_NAME);
}
 
开发者ID:europeana,项目名称:search,代码行数:5,代码来源:DefaultSortedSetDocValuesReaderState.java

示例2: FastTaxonomyFacetCounts

/** Create {@code FastTaxonomyFacetCounts}, which also
 *  counts all facet labels. */
public FastTaxonomyFacetCounts(TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc) throws IOException {
  this(FacetsConfig.DEFAULT_INDEX_FIELD_NAME, taxoReader, config, fc);
}
 
开发者ID:europeana,项目名称:search,代码行数:5,代码来源:FastTaxonomyFacetCounts.java

示例3: TaxonomyFacetSumIntAssociations

/** Create {@code TaxonomyFacetSumIntAssociations} against
 *  the default index field. */
public TaxonomyFacetSumIntAssociations(TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc) throws IOException {
  this(FacetsConfig.DEFAULT_INDEX_FIELD_NAME, taxoReader, config, fc);
}
 
开发者ID:europeana,项目名称:search,代码行数:5,代码来源:TaxonomyFacetSumIntAssociations.java

示例4: TaxonomyFacetSumFloatAssociations

/** Create {@code TaxonomyFacetSumFloatAssociations} against
 *  the default index field. */
public TaxonomyFacetSumFloatAssociations(TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc) throws IOException {
  this(FacetsConfig.DEFAULT_INDEX_FIELD_NAME, taxoReader, config, fc);
}
 
开发者ID:europeana,项目名称:search,代码行数:5,代码来源:TaxonomyFacetSumFloatAssociations.java

示例5: DocValuesOrdinalsReader

/** Default constructor. */
public DocValuesOrdinalsReader() {
  this(FacetsConfig.DEFAULT_INDEX_FIELD_NAME);
}
 
开发者ID:europeana,项目名称:search,代码行数:4,代码来源:DocValuesOrdinalsReader.java

示例6: testWithThreads

@Test
public void testWithThreads() throws Exception {
  // LUCENE-5303: OrdinalsCache used the ThreadLocal BinaryDV instead of reader.getCoreCacheKey().
  Directory indexDir = newDirectory();
  Directory taxoDir = newDirectory();
  IndexWriterConfig conf = newIndexWriterConfig(new MockAnalyzer(random()));
  IndexWriter writer = new IndexWriter(indexDir, conf);
  DirectoryTaxonomyWriter taxoWriter = new DirectoryTaxonomyWriter(taxoDir);
  FacetsConfig config = new FacetsConfig();
  
  Document doc = new Document();
  doc.add(new FacetField("A", "1"));
  writer.addDocument(config.build(taxoWriter, doc));
  doc = new Document();
  doc.add(new FacetField("A", "2"));
  writer.addDocument(config.build(taxoWriter, doc));
  
  final DirectoryReader reader = DirectoryReader.open(writer, true);
  final CachedOrdinalsReader ordsReader = new CachedOrdinalsReader(new DocValuesOrdinalsReader(FacetsConfig.DEFAULT_INDEX_FIELD_NAME));
  Thread[] threads = new Thread[3];
  for (int i = 0; i < threads.length; i++) {
    threads[i] = new Thread("CachedOrdsThread-" + i) {
      @Override
      public void run() {
        for (AtomicReaderContext context : reader.leaves()) {
          try {
            ordsReader.getReader(context);
          } catch (IOException e) {
            throw new RuntimeException(e);
          }
        }
      }
    };
  }

  long ramBytesUsed = 0;
  for (Thread t : threads) {
    t.start();
    t.join();
    if (ramBytesUsed == 0) {
      ramBytesUsed = ordsReader.ramBytesUsed();
    } else {
      assertEquals(ramBytesUsed, ordsReader.ramBytesUsed());
    }
  }
  
  IOUtils.close(writer, taxoWriter, reader, indexDir, taxoDir);
}
 
开发者ID:europeana,项目名称:search,代码行数:48,代码来源:TestCachedOrdinalsReader.java

示例7: TaxonomyFacetSumValueSource

/** Aggreggates float facet values from the provided
 *  {@link ValueSource}, pulling ordinals using {@link
 *  DocValuesOrdinalsReader} against the default indexed
 *  facet field {@link
 *  FacetsConfig#DEFAULT_INDEX_FIELD_NAME}. */
public TaxonomyFacetSumValueSource(TaxonomyReader taxoReader, FacetsConfig config,
                                   FacetsCollector fc, ValueSource valueSource) throws IOException {
  this(new DocValuesOrdinalsReader(FacetsConfig.DEFAULT_INDEX_FIELD_NAME), taxoReader, config, fc, valueSource);
}
 
开发者ID:europeana,项目名称:search,代码行数:9,代码来源:TaxonomyFacetSumValueSource.java


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