@Override public BinaryDocValues getBinaryDocValues( String field ) { return DocValues.emptyBinary(); }
/** * Returns BinaryDocValues for the field, or {@link #emptyBinary} if it has none. * @return docvalues instance, or an empty instance if {@code field} does not exist in this reader. * @throws IllegalStateException if {@code field} exists, but was not indexed with docvalues. * @throws IllegalStateException if {@code field} has docvalues, but the type is not {@link DocValuesType#BINARY} * or {@link DocValuesType#SORTED}. * @throws IOException if an I/O error occurs. */ public static BinaryDocValues getBinary(LeafReader reader, String field) throws IOException { BinaryDocValues dv = reader.getBinaryDocValues(field); if (dv == null) { dv = reader.getSortedDocValues(field); if (dv == null) { checkField(reader, field, DocValuesType.BINARY, DocValuesType.SORTED); return emptyBinary(); } } return dv; }
BinaryEntry entry = binaries.get(field.name); if (entry.docsWithFieldOffset == -2) { return DocValues.emptyBinary();
/** * Return a {@link SortedBinaryDocValues} that doesn't contain any value. */ public static SortedBinaryDocValues emptySortedBinary() { return singleton(DocValues.emptyBinary()); }
/** * Return a {@link SortedBinaryDocValues} that doesn't contain any value. */ public static SortedBinaryDocValues emptySortedBinary() { return singleton(DocValues.emptyBinary()); }
/** * Return a {@link SortedBinaryDocValues} that doesn't contain any value. */ public static SortedBinaryDocValues emptySortedBinary() { return singleton(DocValues.emptyBinary()); }
/** * Return a {@link SortedBinaryDocValues} that doesn't contain any value. */ public static SortedBinaryDocValues emptySortedBinary(int maxDoc) { return singleton(DocValues.emptyBinary(), new Bits.MatchNoBits(maxDoc)); }
/** * Return a {SortedBinaryDocValues} that doesn't contain any value. */ public static SortedBinaryDocValues emptySortedBinary(int maxDoc) { return singleton(DocValues.emptyBinary(), new Bits.MatchNoBits(maxDoc)); }
/** * Return a {@link SortedBinaryDocValues} that doesn't contain any value. */ public static SortedBinaryDocValues emptySortedBinary(int maxDoc) { return singleton(DocValues.emptyBinary(), new Bits.MatchNoBits(maxDoc)); }
@Override public OrdinalsSegmentReader getReader(LeafReaderContext context) throws IOException { BinaryDocValues values0 = context.reader().getBinaryDocValues(field); if (values0 == null) { values0 = DocValues.emptyBinary(); } final BinaryDocValues values = values0; return new OrdinalsSegmentReader() { @Override public void get(int docID, IntsRef ordinals) throws IOException { final BytesRef bytes = values.get(docID); decode(bytes, ordinals); } }; }
@Override public OrdinalsSegmentReader getReader(LeafReaderContext context) throws IOException { BinaryDocValues values0 = context.reader().getBinaryDocValues(field); if (values0 == null) { values0 = DocValues.emptyBinary(); } final BinaryDocValues values = values0; return new OrdinalsSegmentReader() { private int lastDocID; @Override public void get(int docID, IntsRef ordinals) throws IOException { if (docID < lastDocID) { throw new AssertionError("docs out of order: lastDocID=" + lastDocID + " vs docID=" + docID); } lastDocID = docID; if (docID > values.docID()) { values.advance(docID); } final BytesRef bytes; if (values.docID() == docID) { bytes = values.binaryValue(); } else { bytes = new BytesRef(BytesRef.EMPTY_BYTES); } decode(bytes, ordinals); } }; }
/** * Returns BinaryDocValues for the field, or {@link #emptyBinary} if it has none. * @return docvalues instance, or an empty instance if {@code field} does not exist in this reader. * @throws IllegalStateException if {@code field} exists, but was not indexed with docvalues. * @throws IllegalStateException if {@code field} has docvalues, but the type is not {@link DocValuesType#BINARY} * or {@link DocValuesType#SORTED}. * @throws IOException if an I/O error occurs. */ public static BinaryDocValues getBinary(LeafReader reader, String field) throws IOException { BinaryDocValues dv = reader.getBinaryDocValues(field); if (dv == null) { dv = reader.getSortedDocValues(field); if (dv == null) { checkField(reader, field, DocValuesType.BINARY, DocValuesType.SORTED); return emptyBinary(); } } return dv; }
/** * Returns BinaryDocValues for the field, or {@link #emptyBinary} if it has none. * @return docvalues instance, or an empty instance if {@code field} does not exist in this reader. * @throws IllegalStateException if {@code field} exists, but was not indexed with docvalues. * @throws IllegalStateException if {@code field} has docvalues, but the type is not {@link DocValuesType#BINARY} * or {@link DocValuesType#SORTED}. * @throws IOException if an I/O error occurs. */ public static BinaryDocValues getBinary(LeafReader reader, String field) throws IOException { BinaryDocValues dv = reader.getBinaryDocValues(field); if (dv == null) { dv = reader.getSortedDocValues(field); if (dv == null) { checkField(reader, field, DocValuesType.BINARY, DocValuesType.SORTED); return emptyBinary(); } } return dv; }
/** * Returns BinaryDocValues for the field, or {@link #emptyBinary} if it has none. * @return docvalues instance, or an empty instance if {@code field} does not exist in this reader. * @throws IllegalStateException if {@code field} exists, but was not indexed with docvalues. * @throws IllegalStateException if {@code field} has docvalues, but the type is not {@link DocValuesType#BINARY} * or {@link DocValuesType#SORTED}. * @throws IOException if an I/O error occurs. */ public static BinaryDocValues getBinary(LeafReader reader, String field) throws IOException { BinaryDocValues dv = reader.getBinaryDocValues(field); if (dv == null) { dv = reader.getSortedDocValues(field); if (dv == null) { checkField(reader, field, DocValuesType.BINARY, DocValuesType.SORTED); return emptyBinary(); } } return dv; }
public BinaryDocValues getTerms(LeafReader reader, String field, boolean setDocsWithField, float acceptableOverheadRatio) throws IOException { BinaryDocValues valuesIn = reader.getBinaryDocValues(field); if (valuesIn == null) { valuesIn = reader.getSortedDocValues(field); } if (valuesIn != null) { // Not cached here by FieldCacheImpl (cached instead // per-thread by SegmentReader): return valuesIn; } final FieldInfo info = reader.getFieldInfos().fieldInfo(field); if (info == null) { return DocValues.emptyBinary(); } else if (info.getDocValuesType() != DocValuesType.NONE) { throw new IllegalStateException("Type mismatch: " + field + " was indexed as " + info.getDocValuesType()); } else if (info.getIndexOptions() == IndexOptions.NONE) { return DocValues.emptyBinary(); } BinaryDocValuesImpl impl = (BinaryDocValuesImpl) caches.get(BinaryDocValues.class).get(reader, new CacheKey(field, acceptableOverheadRatio), setDocsWithField); return impl.iterator(); }
public BinaryDocValues getTerms(LeafReader reader, String field, boolean setDocsWithField, float acceptableOverheadRatio) throws IOException { BinaryDocValues valuesIn = reader.getBinaryDocValues(field); if (valuesIn == null) { valuesIn = reader.getSortedDocValues(field); } if (valuesIn != null) { // Not cached here by FieldCacheImpl (cached instead // per-thread by SegmentReader): return valuesIn; } final FieldInfo info = reader.getFieldInfos().fieldInfo(field); if (info == null) { return DocValues.emptyBinary(); } else if (info.getDocValuesType() != DocValuesType.NONE) { throw new IllegalStateException("Type mismatch: " + field + " was indexed as " + info.getDocValuesType()); } else if (info.getIndexOptions() == IndexOptions.NONE) { return DocValues.emptyBinary(); } BinaryDocValuesImpl impl = (BinaryDocValuesImpl) caches.get(BinaryDocValues.class).get(reader, new CacheKey(field, acceptableOverheadRatio), setDocsWithField); return impl.iterator(); }
BinaryDocValues v = context.reader().getBinaryDocValues(field); if (v == null) { v = DocValues.emptyBinary(); } else { anyReal = true;
BinaryDocValues v = context.reader().getBinaryDocValues(field); if (v == null) { v = DocValues.emptyBinary(); } else { anyReal = true;
values = DocValues.emptyBinary(); bits = new Bits.MatchNoBits(mergeState.maxDocs[i]);
BinaryEntry entry = binaries.get(field.name); if (entry.docsWithFieldOffset == -2) { return DocValues.emptyBinary();