Java compile errors with named vectors #74
Replies: 4 comments 13 replies
|
Can you try the code example at https://qdrant.tech/documentation/concepts/vectors/#named-vectors? |
10 replies
|
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: |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 ?
All reactions