本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例5: DocValuesOrdinalsReader
/** Default constructor. */
public DocValuesOrdinalsReader() {
this(FacetsConfig.DEFAULT_INDEX_FIELD_NAME);
}
示例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);
}
示例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);
}