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


Java PointValues.getMinPackedValue方法代码示例

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


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

示例1: stats

import org.apache.lucene.index.PointValues; //导入方法依赖的package包/类
@Override
FieldStats.Double stats(IndexReader reader, String fieldName,
                        boolean isSearchable, boolean isAggregatable) throws IOException {
    FieldInfo fi = org.apache.lucene.index.MultiFields.getMergedFieldInfos(reader).fieldInfo(fieldName);
    if (fi == null) {
        return null;
    }
    long size = PointValues.size(reader, fieldName);
    if (size == 0) {
        return new FieldStats.Double(reader.maxDoc(), 0, -1, -1, isSearchable, isAggregatable);
    }
    int docCount = PointValues.getDocCount(reader, fieldName);
    byte[] min = PointValues.getMinPackedValue(reader, fieldName);
    byte[] max = PointValues.getMaxPackedValue(reader, fieldName);
    return new FieldStats.Double(reader.maxDoc(), docCount, -1L, size,
        isSearchable, isAggregatable,
        HalfFloatPoint.decodeDimension(min, 0), HalfFloatPoint.decodeDimension(max, 0));
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:19,代码来源:NumberFieldMapper.java

示例2: stats

import org.apache.lucene.index.PointValues; //导入方法依赖的package包/类
@Override
public FieldStats.Date stats(IndexReader reader) throws IOException {
    String field = name();
    FieldInfo fi = org.apache.lucene.index.MultiFields.getMergedFieldInfos(reader).fieldInfo(name());
    if (fi == null) {
        return null;
    }
    long size = PointValues.size(reader, field);
    if (size == 0) {
        return new FieldStats.Date(reader.maxDoc(), 0, -1, -1, isSearchable(), isAggregatable());
    }
    int docCount = PointValues.getDocCount(reader, field);
    byte[] min = PointValues.getMinPackedValue(reader, field);
    byte[] max = PointValues.getMaxPackedValue(reader, field);
    return new FieldStats.Date(reader.maxDoc(),docCount, -1L, size,
        isSearchable(), isAggregatable(),
        dateTimeFormatter(), LongPoint.decodeDimension(min, 0), LongPoint.decodeDimension(max, 0));
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:19,代码来源:DateFieldMapper.java

示例3: stats

import org.apache.lucene.index.PointValues; //导入方法依赖的package包/类
@Override
public FieldStats.GeoPoint stats(IndexReader reader) throws IOException {
    String field = name();
    FieldInfo fi = org.apache.lucene.index.MultiFields.getMergedFieldInfos(reader).fieldInfo(name());
    if (fi == null) {
        return null;
    }
    final long size = PointValues.size(reader, field);
    if (size == 0) {
        return new FieldStats.GeoPoint(reader.maxDoc(), -1L, -1L, -1L, isSearchable(), isAggregatable());
    }
    final int docCount = PointValues.getDocCount(reader, field);
    byte[] min = PointValues.getMinPackedValue(reader, field);
    byte[] max = PointValues.getMaxPackedValue(reader, field);
    GeoPoint minPt = new GeoPoint(GeoEncodingUtils.decodeLatitude(min, 0), GeoEncodingUtils.decodeLongitude(min, Integer.BYTES));
    GeoPoint maxPt = new GeoPoint(GeoEncodingUtils.decodeLatitude(max, 0), GeoEncodingUtils.decodeLongitude(max, Integer.BYTES));
    return new FieldStats.GeoPoint(reader.maxDoc(), docCount, -1L, size, isSearchable(), isAggregatable(),
        minPt, maxPt);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:20,代码来源:GeoPointFieldMapper.java

示例4: stats

import org.apache.lucene.index.PointValues; //导入方法依赖的package包/类
@Override
public FieldStats.Ip stats(IndexReader reader) throws IOException {
    String field = name();
    FieldInfo fi = org.apache.lucene.index.MultiFields.getMergedFieldInfos(reader).fieldInfo(name());
    if (fi == null) {
        return null;
    }
    long size = PointValues.size(reader, field);
    if (size == 0) {
        return new FieldStats.Ip(reader.maxDoc(), 0, -1, -1, isSearchable(), isAggregatable());
    }
    int docCount = PointValues.getDocCount(reader, field);
    byte[] min = PointValues.getMinPackedValue(reader, field);
    byte[] max = PointValues.getMaxPackedValue(reader, field);
    return new FieldStats.Ip(reader.maxDoc(), docCount, -1L, size,
        isSearchable(), isAggregatable(),
        InetAddressPoint.decode(min), InetAddressPoint.decode(max));
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:19,代码来源:IpFieldMapper.java

示例5: stats

import org.apache.lucene.index.PointValues; //导入方法依赖的package包/类
@Override
public FieldStats stats(IndexReader reader) throws IOException {
    String fieldName = name();
    long size = PointValues.size(reader, fieldName);
    if (size == 0) {
        return null;
    }
    int docCount = PointValues.getDocCount(reader, fieldName);
    byte[] min = PointValues.getMinPackedValue(reader, fieldName);
    byte[] max = PointValues.getMaxPackedValue(reader, fieldName);
    return new FieldStats.Long(reader.maxDoc(),docCount, -1L, size, true, false,
            LongPoint.decodeDimension(min, 0), LongPoint.decodeDimension(max, 0));
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:SeqNoFieldMapper.java


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