Can't search sparse vectors with Batch search: version= 1.7.1 #487
Unanswered
Saurabh-Dadhich
asked this question in
Q&A
Replies: 0 comments 3 replies
-
@Saurabh-Dadhich |
Beta Was this translation helpful? Give feedback.
0 replies
-
Same issue, so the current solution is to not use grpc ? =/ |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
when I search with sparse separately then I am getting desired output:
output = await client.search(
collection_name=collection_name,
query_vector=models.NamedSparseVector(
name="text",
vector=models.SparseVector(
indices=query_indices,
values=query_values,
),),
query_filter=filter,
limit=1,
with_payload=True
)
->
[ScoredPoint(id=7359, version=0, score=16.72979736328125, payload={'model_type': 'test_10k_0'}, vector=None, shard_key=None)]
but with Batch Search it is failing with error:
............
def convert_search_request(
1968 cls, model: rest.SearchRequest, collection_name: str
1969 ) -> grpc.SearchPoints:
-> 1970 vector, name = cls.convert_named_vector_struct(model.vector)
1972 return grpc.SearchPoints(
1973 collection_name=collection_name,
1974 vector=vector,
(...)
1989 else None,
1990 )
File /usr/local/lib/python3.9/site-packages/qdrant_client/conversions/conversion.py:1964, in RestToGrpc.convert_named_vector_struct(cls, model)
1962 return model.vector, model.name
1963 else:
-> 1964 raise ValueError(f"invalid NamedVectorStruct model: {model}")
ValueError: invalid NamedVectorStruct model: name='text' vector=SparseVector(indices=[1029, 2001, 2002, 2010, 2018, 2020, 2032, 2040, 2253, 2332, 2338, 2343, 2365, 2563, 3159, 3364, 3410, 3656, 3910, 4074, 4300, 5708, 6384, 7150, 7664, 8925, 9895, 10662, 13084, 13402, 15993], values=[0.1526612937450409, 1.2225030660629272, 0.93537437915802, 0.5707768201828003, 0.06368067860603333, 0.22014950215816498, 0.07290615886449814, 0.04111705720424652, 0.3879556655883789, 0.5963300466537476, 0.07041019946336746, 0.088597372174263, 0.1444776952266693, 0.1480744183063507, 0.40767455101013184, 1.0532915592193604, 0.5268365144729614, 0.12913961708545685, 1.8436529636383057, 0.08647909760475159, 3.043473958969116, 0.3512234389781952, 0.11374594271183014, 0.06685321033000946, 0.17790648341178894, 0.0639503225684166, 0.018158389255404472, 0.24518823623657227, 0.4965633749961853, 3.1616880893707275, 0.46298572421073914])
Beta Was this translation helpful? Give feedback.
All reactions