Created
September 26, 2022 14:18
-
-
Save kacperlukawski/c3776a82bc500ac81a866808f451d0b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
results = client.search_batch( | |
collection_name="test_collection", | |
requests=[ | |
SearchRequest( | |
vector=[0., 0., 2., 0.], | |
limit=1, | |
), | |
SearchRequest( | |
vector=[0., 0., 0., 0.01], | |
with_vector=True, | |
limit=2, | |
) | |
] | |
) | |
# Out: [ | |
# [ScoredPoint(id=2, version=0, score=1.9, | |
# payload=None, vector=None)], | |
# [ScoredPoint(id=3, version=0, score=0.09, | |
# payload=None, vector=[0.0, 0.0, 0.0, 0.1]), | |
# ScoredPoint(id=1, version=0, score=0.10049876, | |
# payload=None, vector=[0.0, 0.1, 0.0, 0.0])] | |
# ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment