/** Retrieves a {@link Bits} instance representing documents that have a value in this segment. */ protected Bits getDocsWithValue(LeafReaderContext context, String field) throws IOException { return DocValues.getDocsWithField(context.reader(), field); } }
/** Retrieves a {@link Bits} instance representing documents that have a value in this segment. */ protected Bits getDocsWithValue(LeafReaderContext context, String field) throws IOException { return DocValues.getDocsWithField(context.reader(), field); } }
/** Retrieves the set of documents that have a value in this segment */ protected Bits getDocsWithField(LeafReaderContext context, String field) throws IOException { return DocValues.getDocsWithField(context.reader(), field); }
/** Retrieves the set of documents that have a value in this segment */ protected Bits getDocsWithField(LeafReaderContext context, String field) throws IOException { return DocValues.getDocsWithField(context.reader(), field); }
@Override public void doSetNextReader(final LeafReaderContext context) throws IOException { final LeafReader atomicReader = context.reader(); docsWithLatitude = DocValues.getDocsWithField( atomicReader, latitudeField ); docsWithLongitude = DocValues.getDocsWithField( atomicReader, longitudeField ); latitudeValues = DocValues.getNumeric( atomicReader, latitudeField ); longitudeValues = DocValues.getNumeric( atomicReader, longitudeField ); }
private void lazyInit() throws IOException { if ( docsWithLatitude != null ) { return; } LeafReader atomicReader = context.reader(); this.docsWithLatitude = DocValues.getDocsWithField( atomicReader, getLatitudeField() ); this.docsWithLongitude = DocValues.getDocsWithField( atomicReader, getLongitudeField() ); this.latitudeValues = DocValues.getNumeric( atomicReader, getLatitudeField() ); this.longitudeValues = DocValues.getNumeric( atomicReader, getLongitudeField() ); }
@Override public void doSetNextReader(final LeafReaderContext context) throws IOException { final LeafReader atomicReader = context.reader(); docsWithLatitude = DocValues.getDocsWithField( atomicReader, latitudeField ); docsWithLongitude = DocValues.getDocsWithField( atomicReader, longitudeField ); latitudeValues = DocValues.getNumeric( atomicReader, latitudeField ); longitudeValues = DocValues.getNumeric( atomicReader, longitudeField ); }
DistanceLeafCollector(LeafReaderContext context) throws IOException { final LeafReader atomicReader = context.reader(); this.docsWithLatitude = DocValues.getDocsWithField( atomicReader, latitudeField ); this.docsWithLongitude = DocValues.getDocsWithField( atomicReader, longitudeField ); this.latitudeValues = DocValues.getNumeric( atomicReader, latitudeField ); this.longitudeValues = DocValues.getNumeric( atomicReader, longitudeField ); this.docBase = context.docBase; }
private void lazyInit() throws IOException { if ( docsWithLatitude != null ) { return; } LeafReader atomicReader = context.reader(); this.docsWithLatitude = DocValues.getDocsWithField( atomicReader, getLatitudeField() ); this.docsWithLongitude = DocValues.getDocsWithField( atomicReader, getLongitudeField() ); this.latitudeValues = DocValues.getNumeric( atomicReader, getLatitudeField() ); this.longitudeValues = DocValues.getNumeric( atomicReader, getLongitudeField() ); }
DistanceLeafCollector(LeafReaderContext context) throws IOException { final LeafReader atomicReader = context.reader(); this.docsWithLatitude = DocValues.getDocsWithField( atomicReader, latitudeField ); this.docsWithLongitude = DocValues.getDocsWithField( atomicReader, longitudeField ); this.latitudeValues = DocValues.getNumeric( atomicReader, latitudeField ); this.longitudeValues = DocValues.getNumeric( atomicReader, longitudeField ); this.docBase = context.docBase; }
@Override public SortedBinaryDocValues getBytesValues() { try { final BinaryDocValues values = DocValues.getBinary(reader, field); final Bits docsWithField = DocValues.getDocsWithField(reader, field); return FieldData.singleton(values, docsWithField); } catch (IOException e) { throw new IllegalStateException("Cannot load doc values", e); } }
@Override public SortedBinaryDocValues getBytesValues() { try { final BinaryDocValues values = DocValues.getBinary(reader, field); final Bits docsWithField = DocValues.getDocsWithField(reader, field); return FieldData.singleton(values, docsWithField); } catch (IOException e) { throw new IllegalStateException("Cannot load doc values", e); } }
@Override public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException { final NumericDocValues arr = DocValues.getNumeric(readerContext.reader(), field); final Bits valid = DocValues.getDocsWithField(readerContext.reader(), field); return new DoubleDocValues(this) { @Override public double doubleVal(int doc) { return Double.longBitsToDouble(arr.get(doc)); } @Override public boolean exists(int doc) { return arr.get(doc) != 0 || valid.get(doc); } @Override public ValueFiller getValueFiller() { return new ValueFiller() { private final MutableValueDouble mval = new MutableValueDouble(); @Override public MutableValue getValue() { return mval; } @Override public void fillValue(int doc) { mval.value = doubleVal(doc); mval.exists = mval.value != 0 || valid.get(doc); } }; } }; }
@Override public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException { final NumericDocValues arr = DocValues.getNumeric(readerContext.reader(), field); final Bits valid = DocValues.getDocsWithField(readerContext.reader(), field); return new FloatDocValues(this) { @Override public float floatVal(int doc) { return Float.intBitsToFloat((int)arr.get(doc)); } @Override public boolean exists(int doc) { return arr.get(doc) != 0 || valid.get(doc); } @Override public ValueFiller getValueFiller() { return new ValueFiller() { private final MutableValueFloat mval = new MutableValueFloat(); @Override public MutableValue getValue() { return mval; } @Override public void fillValue(int doc) { mval.value = floatVal(doc); mval.exists = mval.value != 0 || valid.get(doc); } }; } }; }
@Override public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException { final NumericDocValues arr = DocValues.getNumeric(readerContext.reader(), field); final Bits valid = DocValues.getDocsWithField(readerContext.reader(), field); return new FloatDocValues(this) { @Override public float floatVal(int doc) { return Float.intBitsToFloat((int)arr.get(doc)); } @Override public boolean exists(int doc) { return arr.get(doc) != 0 || valid.get(doc); } @Override public ValueFiller getValueFiller() { return new ValueFiller() { private final MutableValueFloat mval = new MutableValueFloat(); @Override public MutableValue getValue() { return mval; } @Override public void fillValue(int doc) { mval.value = floatVal(doc); mval.exists = mval.value != 0 || valid.get(doc); } }; } }; }
@Override public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException { final NumericDocValues arr = DocValues.getNumeric(readerContext.reader(), field); final Bits valid = DocValues.getDocsWithField(readerContext.reader(), field); return new DoubleDocValues(this) { @Override public double doubleVal(int doc) { return Double.longBitsToDouble(arr.get(doc)); } @Override public boolean exists(int doc) { return arr.get(doc) != 0 || valid.get(doc); } @Override public ValueFiller getValueFiller() { return new ValueFiller() { private final MutableValueDouble mval = new MutableValueDouble(); @Override public MutableValue getValue() { return mval; } @Override public void fillValue(int doc) { mval.value = doubleVal(doc); mval.exists = mval.value != 0 || valid.get(doc); } }; } }; }
@Override public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException { final NumericDocValues arr = DocValues.getNumeric(readerContext.reader(), field); final Bits valid = DocValues.getDocsWithField(readerContext.reader(), field);
@Override protected Bits getDocsWithValue(LeafReaderContext context, String field) throws IOException { final Bits docsWithValue = DocValues.getDocsWithField(context.reader(), field); final BitSet parents = parentFilter.getBitSet(context); final BitSet children = childFilter.getBitSet(context); if (children == null) { return new Bits.MatchNoBits(context.reader().maxDoc()); } return BlockJoinSelector.wrap(docsWithValue, parents, children); } };
@Override protected Bits getDocsWithValue(LeafReaderContext context, String field) throws IOException { final Bits docsWithValue = DocValues.getDocsWithField(context.reader(), field); final BitSet parents = parentFilter.getBitSet(context); final BitSet children = childFilter.getBitSet(context); if (children == null) { return new Bits.MatchNoBits(context.reader().maxDoc()); } return BlockJoinSelector.wrap(docsWithValue, parents, children); } };
@Override protected Bits getDocsWithValue(LeafReaderContext context, String field) throws IOException { final Bits docsWithValue = DocValues.getDocsWithField(context.reader(), field); final BitSet parents = parentFilter.getBitSet(context); final BitSet children = childFilter.getBitSet(context); if (children == null) { return new Bits.MatchNoBits(context.reader().maxDoc()); } return BlockJoinSelector.wrap(docsWithValue, parents, children); } };