@Override public Bits getDocsWithField(FieldInfo field) throws IOException { switch(field.getDocValuesType()) { case SORTED_SET: return DocValues.docsWithValue(getSortedSet(field), maxDoc); case SORTED_NUMERIC: return DocValues.docsWithValue(getSortedNumeric(field), maxDoc); case SORTED: return DocValues.docsWithValue(getSorted(field), maxDoc); case BINARY: BinaryEntry be = binaries.get(field.name); return getLiveBits(be.missingOffset, maxDoc); case NUMERIC: NumericEntry ne = numerics.get(field.name); return getLiveBits(ne.missingOffset, maxDoc); default: throw new AssertionError(); } }
@Override public Bits getDocsWithField(FieldInfo field) throws IOException { switch(field.getDocValuesType()) { case SORTED_SET: return DocValues.docsWithValue(getSortedSet(field), maxDoc); case SORTED_NUMERIC: return DocValues.docsWithValue(getSortedNumeric(field), maxDoc); case SORTED: return DocValues.docsWithValue(getSorted(field), maxDoc); case BINARY: BinaryEntry be = binaries.get(field.name); return getMissingBits(be.missingOffset); case NUMERIC: NumericEntry ne = numerics.get(field.name); return getMissingBits(ne.missingOffset); default: throw new AssertionError(); } }
@Override public Bits getDocsWithField(FieldInfo field) throws IOException { switch(field.getDocValuesType()) { case SORTED_SET: return DocValues.docsWithValue(getSortedSet(field), maxDoc); case SORTED_NUMERIC: return DocValues.docsWithValue(getSortedNumeric(field), maxDoc); case SORTED: return DocValues.docsWithValue(getSorted(field), maxDoc); case BINARY: BinaryEntry be = binaries.get(field.name); return getMissingBits(be.missingOffset); case NUMERIC: NumericEntry ne = numerics.get(field.name); return getMissingBits(ne.missingOffset); default: throw new AssertionError(); } }
@Override public Bits getDocsWithField(FieldInfo field) throws IOException { switch(field.getDocValuesType()) { case SORTED_SET: return DocValues.docsWithValue(getSortedSet(field), maxDoc); case SORTED: return DocValues.docsWithValue(getSorted(field), maxDoc); case BINARY: BinaryEntry be = binaries.get(field.number); return getMissingBits(be.missingOffset); case NUMERIC: NumericEntry ne = numerics.get(field.number); return getMissingBits(ne.missingOffset); default: throw new AssertionError(); } }
@Override public Bits getDocsWithField(FieldInfo field) throws IOException { if (field.getDocValuesType() == DocValuesType.SORTED_SET) { return DocValues.docsWithValue(getSortedSet(field), maxDoc); } else { return new Bits.MatchAllBits(maxDoc); } }
@Override public Bits getDocsWithField(FieldInfo field) throws IOException { switch(field.getDocValuesType()) { case SORTED_SET: return DocValues.docsWithValue(getSortedSet(field), maxDoc); case SORTED_NUMERIC: return DocValues.docsWithValue(getSortedNumeric(field), maxDoc); case SORTED: return DocValues.docsWithValue(getSorted(field), maxDoc); case BINARY: BinaryEntry be = binaries.get(field.name); return getLiveBits(be.missingOffset, maxDoc); case NUMERIC: NumericEntry ne = numerics.get(field.name); if (ne.format == SPARSE_COMPRESSED) { return getSparseLiveBits(ne); } else { return getLiveBits(ne.missingOffset, maxDoc); } default: throw new AssertionError(); } }
@Override public Bits getDocsWithField(FieldInfo field) throws IOException { switch(field.getDocValuesType()) { case SORTED_SET: return DocValues.docsWithValue(getSortedSet(field), maxDoc); case SORTED_NUMERIC: return DocValues.docsWithValue(getSortedNumeric(field), maxDoc); case SORTED: return DocValues.docsWithValue(getSorted(field), maxDoc); case BINARY: BinaryEntry be = binaries.get(field.name); return getLiveBits(be.missingOffset, maxDoc); case NUMERIC: NumericEntry ne = numerics.get(field.name); if (ne.format == SPARSE_COMPRESSED) { return getSparseLiveBits(ne); } else { return getLiveBits(ne.missingOffset, maxDoc); } default: throw new AssertionError(); } }
@Override public Bits docsWithValue(LeafReaderContext context) { final RandomAccessOrds ordinals = ordinalsValues(context); if (DocValues.unwrapSingleton(ordinals) != null) { return DocValues.docsWithValue(DocValues.unwrapSingleton(ordinals), context.reader().maxDoc()); } else { return DocValues.docsWithValue(ordinals, context.reader().maxDoc()); } }
@Override public Bits docsWithValue(LeafReaderContext context) { final RandomAccessOrds ordinals = ordinalsValues(context); if (DocValues.unwrapSingleton(ordinals) != null) { return DocValues.docsWithValue(DocValues.unwrapSingleton(ordinals), context.reader().maxDoc()); } else { return DocValues.docsWithValue(ordinals, context.reader().maxDoc()); } }
@Override public Bits docsWithValue(LeafReaderContext context) { final RandomAccessOrds ordinals = ordinalsValues(context); if (DocValues.unwrapSingleton(ordinals) != null) { return DocValues.docsWithValue(DocValues.unwrapSingleton(ordinals), context.reader().maxDoc()); } else { return DocValues.docsWithValue(ordinals, context.reader().maxDoc()); } }
/** Wraps the provided {@link SortedNumericDocValues} in order to only select * one value per parent among its {@code children} using the configured * {@code selection} type. */ public static NumericDocValues wrap(SortedNumericDocValues sortedNumerics, Type selection, BitSet parents, BitSet children) { NumericDocValues values; switch (selection) { case MIN: values = SortedNumericSelector.wrap(sortedNumerics, SortedNumericSelector.Type.MIN, SortField.Type.LONG); break; case MAX: values = SortedNumericSelector.wrap(sortedNumerics, SortedNumericSelector.Type.MAX, SortField.Type.LONG); break; default: throw new AssertionError(); } return wrap(values, DocValues.docsWithValue(sortedNumerics, parents.length()), selection, parents, children); }
return FieldData.singleton(singleValues, DocValues.docsWithValue(ords, maxDoc)); } else { return new SortedNumericDoubleValues() {
return DocValues.singleton(singleValues, DocValues.docsWithValue(ords, maxDoc)); } else { return new SortedNumericDocValues() {
return FieldData.singleton(singleValues, DocValues.docsWithValue(ords, maxDoc)); } else { return new SortedNumericDoubleValues() {
return FieldData.singleton(values, DocValues.docsWithValue(singleOrds, maxDoc));
return FieldData.singleton(values, DocValues.docsWithValue(singleOrds, maxDoc)); } else { final GeoPoint point = new GeoPoint();
return FieldData.singleton(values, DocValues.docsWithValue(singleOrds, maxDoc)); } else { final GeoPoint point = new GeoPoint();
@Override public Bits docsWithValue(LeafReaderContext context) throws IOException { if (isFloatingPoint()) { final SortedNumericDoubleValues values = doubleValues(context); if (org.elasticsearch.index.fielddata.FieldData.unwrapSingleton(values) != null) { return org.elasticsearch.index.fielddata.FieldData.unwrapSingletonBits(values); } else { return org.elasticsearch.index.fielddata.FieldData.docsWithValue(values, context.reader().maxDoc()); } } else { final SortedNumericDocValues values = longValues(context); if (DocValues.unwrapSingleton(values) != null) { return DocValues.unwrapSingletonBits(values); } else { return DocValues.docsWithValue(values, context.reader().maxDoc()); } } }
@Override public Bits docsWithValue(LeafReaderContext context) throws IOException { if (isFloatingPoint()) { final SortedNumericDoubleValues values = doubleValues(context); if (org.elasticsearch.index.fielddata.FieldData.unwrapSingleton(values) != null) { return org.elasticsearch.index.fielddata.FieldData.unwrapSingletonBits(values); } else { return org.elasticsearch.index.fielddata.FieldData.docsWithValue(values, context.reader().maxDoc()); } } else { final SortedNumericDocValues values = longValues(context); if (DocValues.unwrapSingleton(values) != null) { return DocValues.unwrapSingletonBits(values); } else { return DocValues.docsWithValue(values, context.reader().maxDoc()); } } }
@Override public Bits docsWithValue(LeafReaderContext context) throws IOException { if (isFloatingPoint()) { final SortedNumericDoubleValues values = doubleValues(context); if (org.codelibs.elasticsearch.index.fielddata.FieldData.unwrapSingleton(values) != null) { return org.codelibs.elasticsearch.index.fielddata.FieldData.unwrapSingletonBits(values); } else { return org.codelibs.elasticsearch.index.fielddata.FieldData.docsWithValue(values, context.reader().maxDoc()); } } else { final SortedNumericDocValues values = longValues(context); if (DocValues.unwrapSingleton(values) != null) { return DocValues.unwrapSingletonBits(values); } else { return DocValues.docsWithValue(values, context.reader().maxDoc()); } } }