/** This instance will directly reference bytes w/o making a copy. * bytes should not be null. */ public BytesRef(byte[] bytes, int offset, int length) { this.bytes = bytes; this.offset = offset; this.length = length; assert isValid(); }
private static void checkBinaryDocValues(String fieldName, int maxDoc, BinaryDocValues bdv) throws IOException { int doc; if (bdv.docID() != -1) { throw new RuntimeException("binary dv iterator for field: " + fieldName + " should start at docID=-1, but got " + bdv.docID()); } // TODO: we could add stats to DVs, e.g. total doc count w/ a value for this field while ((doc = bdv.nextDoc()) != NO_MORE_DOCS) { BytesRef value = bdv.binaryValue(); value.isValid(); } }
for (long i = 0; i <= maxOrd; i++) { final BytesRef term = dv.lookupOrd(i); assert term.isValid(); if (lastValue != null) { if (term.compareTo(lastValue) <= 0) {
for (int i = 0; i <= maxOrd; i++) { final BytesRef term = dv.lookupOrd(i); term.isValid(); if (lastValue != null) { if (term.compareTo(lastValue) <= 0) {
assert term.isValid();
BytesRef bb = terms.getMin(); if (bb != null) { assert bb.isValid(); minTerm = BytesRef.deepCopyOf(bb); } else { assert bb.isValid(); maxTerm = BytesRef.deepCopyOf(bb); if (minTerm == null) { assert term.isValid(); BytesRef payload = postings.getPayload(); if (payload != null) { assert payload.isValid();
/** This instance will directly reference bytes w/o making a copy. * bytes should not be null. */ public BytesRef(byte[] bytes, int offset, int length) { this.bytes = bytes; this.offset = offset; this.length = length; assert isValid(); }
/** This instance will directly reference bytes w/o making a copy. * bytes should not be null. */ public BytesRef(byte[] bytes, int offset, int length) { this.bytes = bytes; this.offset = offset; this.length = length; assert isValid(); }
/** * This instance will directly reference bytes w/o making a copy. bytes should not be null. */ public BytesRef(byte[] bytes, int offset, int length) { this.bytes = bytes; this.offset = offset; this.length = length; assert isValid(); }
/** This instance will directly reference bytes w/o making a copy. * bytes should not be null. */ public BytesRef(byte[] bytes, int offset, int length) { this.bytes = bytes; this.offset = offset; this.length = length; assert isValid(); }
private static void checkBinaryDocValues(String fieldName, int maxDoc, BinaryDocValues dv, Bits docsWithField) { for (int i = 0; i < maxDoc; i++) { final BytesRef term = dv.get(i); assert term.isValid(); if (docsWithField.get(i) == false && term.length > 0) { throw new RuntimeException("dv for field: " + fieldName + " is missing but has value=" + term + " for doc: " + i); } } }
private static void checkBinaryDocValues(String fieldName, int maxDoc, BinaryDocValues dv, Bits docsWithField) { for (int i = 0; i < maxDoc; i++) { final BytesRef term = dv.get(i); assert term.isValid(); if (docsWithField.get(i) == false && term.length > 0) { throw new RuntimeException("dv for field: " + fieldName + " is missing but has value=" + term + " for doc: " + i); } } }
private static void checkBinaryDocValues(String fieldName, int maxDoc, BinaryDocValues bdv) throws IOException { int doc; if (bdv.docID() != -1) { throw new RuntimeException("binary dv iterator for field: " + fieldName + " should start at docID=-1, but got " + bdv.docID()); } // TODO: we could add stats to DVs, e.g. total doc count w/ a value for this field while ((doc = bdv.nextDoc()) != NO_MORE_DOCS) { BytesRef value = bdv.binaryValue(); value.isValid(); } }
for (long i = 0; i <= maxOrd; i++) { final BytesRef term = dv.lookupOrd(i); assert term.isValid(); if (lastValue != null) { if (term.compareTo(lastValue) <= 0) {
for (int i = 0; i <= maxOrd; i++) { final BytesRef term = dv.lookupOrd(i); assert term.isValid(); if (lastValue != null) { if (term.compareTo(lastValue) <= 0) {
for (long i = 0; i <= maxOrd; i++) { final BytesRef term = dv.lookupOrd(i); assert term.isValid(); if (lastValue != null) { if (term.compareTo(lastValue) <= 0) {
for (int i = 0; i <= maxOrd; i++) { final BytesRef term = dv.lookupOrd(i); term.isValid(); if (lastValue != null) { if (term.compareTo(lastValue) <= 0) {
for (int i = 0; i <= maxOrd; i++) { final BytesRef term = dv.lookupOrd(i); assert term.isValid(); if (lastValue != null) { if (term.compareTo(lastValue) <= 0) {
assert term.isValid();