@Override public PointValues getPointValues(String field) throws IOException { return in.getPointValues(field); }
@Override public PointValues getValues(String field) throws IOException { return reader.getPointValues(field); }
@Override public PointValues getPointValues(String field) throws IOException { return isMeta(field) ? in.getPointValues(field) : null; }
@Override public PointValues getPointValues(String fieldName) throws IOException { final PointValues inPointValues = in.getPointValues(fieldName); if (inPointValues == null) { return null; } else { return new SortingPointValues(inPointValues, docMap); } }
@Override public PointValues getPointValues(String fieldName) throws IOException { ensureOpen(); LeafReader reader = fieldToReader.get(fieldName); return reader == null ? null : reader.getPointValues(fieldName); }
/** Return the cumulated number of points across all leaves of the given * {@link IndexReader}. Leaves that do not have points for the given field * are ignored. * @see PointValues#size() */ public static long size(IndexReader reader, String field) throws IOException { long size = 0; for (LeafReaderContext ctx : reader.leaves()) { PointValues values = ctx.reader().getPointValues(field); if (values != null) { size += values.size(); } } return size; }
/** Return the cumulated number of docs that have points across all leaves * of the given {@link IndexReader}. Leaves that do not have points for the * given field are ignored. * @see PointValues#getDocCount() */ public static int getDocCount(IndexReader reader, String field) throws IOException { int count = 0; for (LeafReaderContext ctx : reader.leaves()) { PointValues values = ctx.reader().getPointValues(field); if (values != null) { count += values.getDocCount(); } } return count; }
/** Return the maximum packed values across all leaves of the given * {@link IndexReader}. Leaves that do not have points for the given field * are ignored. * @see PointValues#getMaxPackedValue() */ public static byte[] getMaxPackedValue(IndexReader reader, String field) throws IOException { byte[] maxValue = null; for (LeafReaderContext ctx : reader.leaves()) { PointValues values = ctx.reader().getPointValues(field); if (values == null) { continue; } byte[] leafMaxValue = values.getMaxPackedValue(); if (leafMaxValue == null) { continue; } if (maxValue == null) { maxValue = leafMaxValue.clone(); } else { final int numDimensions = values.getNumIndexDimensions(); final int numBytesPerDimension = values.getBytesPerDimension(); for (int i = 0; i < numDimensions; ++i) { int offset = i * numBytesPerDimension; if (FutureArrays.compareUnsigned(leafMaxValue, offset, offset + numBytesPerDimension, maxValue, offset, offset + numBytesPerDimension) > 0) { System.arraycopy(leafMaxValue, offset, maxValue, offset, numBytesPerDimension); } } } } return maxValue; }
/** Return the minimum packed values across all leaves of the given * {@link IndexReader}. Leaves that do not have points for the given field * are ignored. * @see PointValues#getMinPackedValue() */ public static byte[] getMinPackedValue(IndexReader reader, String field) throws IOException { byte[] minValue = null; for (LeafReaderContext ctx : reader.leaves()) { PointValues values = ctx.reader().getPointValues(field); if (values == null) { continue; } byte[] leafMinValue = values.getMinPackedValue(); if (leafMinValue == null) { continue; } if (minValue == null) { minValue = leafMinValue.clone(); } else { final int numDimensions = values.getNumIndexDimensions(); final int numBytesPerDimension = values.getBytesPerDimension(); for (int i = 0; i < numDimensions; ++i) { int offset = i * numBytesPerDimension; if (FutureArrays.compareUnsigned(leafMinValue, offset, offset + numBytesPerDimension, minValue, offset, offset + numBytesPerDimension) < 0) { System.arraycopy(leafMinValue, offset, minValue, offset, numBytesPerDimension); } } } } return minValue; }
LeafReader reader = context.reader(); PointValues values = reader.getPointValues(field); if (values == null) {
@Override public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException { LeafReader reader = context.reader(); PointValues values = reader.getPointValues(field); if (values == null) {
@Override public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException { LeafReader reader = context.reader(); PointValues values = reader.getPointValues(field); if (values == null) {
LeafReader reader = context.reader(); PointValues values = reader.getPointValues(field); if (values == null) {
@Override public Scorer scorer(LeafReaderContext context) throws IOException { LeafReader reader = context.reader(); PointValues values = reader.getPointValues(field); if (values == null) {
final PointValues pointValues = reader.getPointValues(fieldName); if (pointValues == null) { return null;
@Override DocIdSet processLeaf(Query query, CompositeValuesCollectorQueue queue, LeafReaderContext context, boolean fillDocIdSet) throws IOException { final PointValues values = context.reader().getPointValues(field); if (values == null) {
final PointValues pointValues = reader.getPointValues(fieldName); if (pointValues == null) { return null;
@Override public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException { LeafReader reader = context.reader(); PointValues values = reader.getPointValues(field); if (values == null) {
@Override public PointValues getPointValues(String fieldName) throws IOException { final PointValues inPointValues = in.getPointValues(fieldName); if (inPointValues == null) { return null; } else { return new SortingPointValues(inPointValues, docMap); } }
@Override public PointValues getPointValues(String field) throws IOException { return isMeta(field) ? in.getPointValues(field) : null; }