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,10 +80,8 @@ public class SimpleTextVectorWriter extends VectorWriter {
|
|||
docIds.add(docV);
|
||||
}
|
||||
long vectorDataLength = vectorData.getFilePointer() - vectorDataOffset;
|
||||
if (vectorDataLength > 0) {
|
||||
writeMeta(fieldInfo, vectorDataOffset, vectorDataLength, docIds);
|
||||
}
|
||||
}
|
||||
|
||||
private void writeVectorValue(VectorValues vectors) throws IOException {
|
||||
// write vector value
|
||||
|
|
|
@ -91,7 +91,7 @@ public class AssertingVectorFormat extends VectorFormat {
|
|||
VectorValues values = delegate.getVectorValues(field);
|
||||
if (values != null) {
|
||||
assert values.docID() == -1;
|
||||
assert values.size() > 0;
|
||||
assert values.size() >= 0;
|
||||
assert values.dimension() > 0;
|
||||
assert values.similarityFunction() != null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue