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


Java PackedInts.FASTEST属性代码示例

本文整理汇总了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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:43,代码来源:MultiOrdinalsTests.java

示例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);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:8,代码来源:Lucene42NormsFormat.java

示例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);
}
 
开发者ID:pkarmstr,项目名称:NYBC,代码行数:5,代码来源:Lucene42NormsFormat.java


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