本文整理汇总了Java中org.apache.lucene.util.packed.PackedInts.FASTEST属性的典型用法代码示例。如果您正苦于以下问题:Java PackedInts.FASTEST属性的具体用法?Java PackedInts.FASTEST怎么用?Java PackedInts.FASTEST使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.lucene.util.packed.PackedInts
的用法示例。
在下文中一共展示了PackedInts.FASTEST属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testMultiValuesDocsWithOverlappingStorageArrays
public void testMultiValuesDocsWithOverlappingStorageArrays() throws Exception {
int maxDoc = 7;
long maxOrds = 15;
OrdinalsBuilder builder = new OrdinalsBuilder(maxDoc);
for (int i = 0; i < maxOrds; i++) {
builder.nextOrdinal();
if (i < 10) {
builder.addDoc(0);
}
builder.addDoc(1);
if (i == 0) {
builder.addDoc(2);
}
if (i < 5) {
builder.addDoc(3);
}
if (i < 6) {
builder.addDoc(4);
}
if (i == 1) {
builder.addDoc(5);
}
if (i < 10) {
builder.addDoc(6);
}
}
long[][] ordinalPlan = new long[][]{
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
{0,1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14},
{0},
{0, 1, 2, 3, 4},
{0, 1, 2, 3, 4, 5},
{1},
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
};
Ordinals ordinals = new MultiOrdinals(builder, PackedInts.FASTEST);
RandomAccessOrds docs = ordinals.ordinals();
assertEquals(docs, ordinalPlan);
}
示例2: Lucene42NormsFormat
/**
* Calls {@link #Lucene42NormsFormat(float)
* Lucene42DocValuesFormat(PackedInts.FASTEST)}
*/
public Lucene42NormsFormat() {
// note: we choose FASTEST here (otherwise our norms are half as big but 15% slower than previous lucene)
this(PackedInts.FASTEST);
}
示例3: normsConsumer
@Override
public DocValuesConsumer normsConsumer(SegmentWriteState state) throws IOException {
// note: we choose FASTEST here (otherwise our norms are half as big but 15% slower than previous lucene)
return new Lucene42DocValuesConsumer(state, DATA_CODEC, DATA_EXTENSION, METADATA_CODEC, METADATA_EXTENSION, PackedInts.FASTEST);
}