mirror of https://github.com/apache/lucene.git
LUCENE-9992: Update expectations about vectors with no values.
This commit is contained in:
parent
465cb17d2b
commit
f5e050bd00
|
@ -80,9 +80,7 @@ public class SimpleTextVectorWriter extends VectorWriter {
|
||||||
docIds.add(docV);
|
docIds.add(docV);
|
||||||
}
|
}
|
||||||
long vectorDataLength = vectorData.getFilePointer() - vectorDataOffset;
|
long vectorDataLength = vectorData.getFilePointer() - vectorDataOffset;
|
||||||
if (vectorDataLength > 0) {
|
writeMeta(fieldInfo, vectorDataOffset, vectorDataLength, docIds);
|
||||||
writeMeta(fieldInfo, vectorDataOffset, vectorDataLength, docIds);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeVectorValue(VectorValues vectors) throws IOException {
|
private void writeVectorValue(VectorValues vectors) throws IOException {
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class AssertingVectorFormat extends VectorFormat {
|
||||||
VectorValues values = delegate.getVectorValues(field);
|
VectorValues values = delegate.getVectorValues(field);
|
||||||
if (values != null) {
|
if (values != null) {
|
||||||
assert values.docID() == -1;
|
assert values.docID() == -1;
|
||||||
assert values.size() > 0;
|
assert values.size() >= 0;
|
||||||
assert values.dimension() > 0;
|
assert values.dimension() > 0;
|
||||||
assert values.similarityFunction() != null;
|
assert values.similarityFunction() != null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue