Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

refactor: Use empty named vectors if vectors are omitted #4

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/java/io/qdrant/kafka/ValueExtractor.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.google.protobuf.InvalidProtocolBufferException;
import io.qdrant.client.grpc.JsonWithInt.Value;
import io.qdrant.client.grpc.Points.NamedVectors;
import io.qdrant.client.grpc.Points.PointId;
import io.qdrant.client.grpc.Points.PointStruct;
import io.qdrant.client.grpc.Points.Vectors;
Expand Down Expand Up @@ -77,7 +78,7 @@ public Vectors getVector() {
Value vectorValue = this.valueMap.get(VECTOR_KEY);

if (vectorValue == null) {
return Vectors.getDefaultInstance();
return Vectors.newBuilder().setVectors(NamedVectors.getDefaultInstance()).build();
}

return VectorsFactory.vectors(vectorValue);
Expand Down
Loading