Java compile errors with named vectors #74
Replies: 4 comments 13 replies
-
cc @Anush008 🙏 |
Beta Was this translation helpful? Give feedback.
-
Hey @nirmalavhcl |
Beta Was this translation helpful? Give feedback.
-
Can you try the code example at https://qdrant.tech/documentation/concepts/vectors/#named-vectors? |
Beta Was this translation helpful? Give feedback.
-
Hi, was it resolved? We're struggling when creating named vectors. We are able to set name for sparse vectors in Java with putMap but change vector name from default to "dense" is not possible. Looking for alternative to lovely Python:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Iam using latest versions of qdrant/java-client clode from qdrant github repo and built them using maven and
For our application vector database hybrid search needs, Iam trying to create a collection in Qdrant with named vectors for both dense and sparse vectors
Here is my sample Java program:-
When I build using java21/17, Iam getting this compilation error
error: cannot find symbol
VectorParamsMap.newBuilder().putAllMap(Map.of(
^
symbol: method of(String,VectorParams,String,VectorParams)
location: interface Map
I have tried creating just simple text dense vectors using putMap and that fails similarly on the putMap method.
When I just create a collection with sparse vector(which is always a named vector), the code compiles fine.
QdrantClient client = new QdrantClient(QdrantGrpcClient.newBuilder("127.0.0.1", grpcPort, false).build());
client
.createCollectionAsync(
CreateCollection.newBuilder()
.setCollectionName(collectionName)
.setSparseVectorsConfig(SparseVectorConfig.newBuilder()
.putMap("sparsevec",
SparseVectorParams.newBuilder()
.setModifier(Modifier.Idf)
.setIndex(SparseIndexConfig.newBuilder().setOnDisk(false).build())
.build())
.build())
.get();
Any ideas whats going wrong with named vectors (with dense vectors ) setVectorsConfig syntax ?
Beta Was this translation helpful? Give feedback.
All reactions