qdrant / qdrant-client

Python client for Qdrant vector search engine
https://qdrant.tech
Apache License 2.0
673 stars 106 forks source link

tests: Add more tests cases (prefetch and more). #668

Closed tellet-q closed 4 days ago

tellet-q commented 5 days ago

Currently this PR contains 2 new cases:

  1. request without both prefetched and query fields
  2. request with filtered prefetch
  3. prefetch with score_threshold
  4. prefetch with params
  5. query with params

Note: the 2nd, 3d tests are failing right now

tellet-q commented 5 days ago

More details about the failing 2nd test:

Usually remote client responds with [] in the results but local client shows some points. Example of filters:

Failed with filter should=[FieldCondition(key='id_str', match=None, range=None, geo_bounding_box=None, geo_radius=None, geo_polygon=None, values_count=ValuesCount(lt=3, gt=6, gte=None, lte=None))] min_should=None must=None must_not=None

Failed with filter should=[FieldCondition(key='rand_number', match=None, range=Range(lt=0.4789424343015588, gt=0.6079618984797639, gte=None, lte=None), geo_bounding_box=None, geo_radius=None, geo_polygon=None, values_count=None), NestedCondition(nested=Nested(key='nested.array', filter=Filter(should=None, min_should=None, must=[FieldCondition(key='word', match=MatchValue(value='fish'), range=None, geo_bounding_box=None, geo_radius=None, geo_polygon=None, values_count=None), FieldCondition(key='number', match=None, range=Range(lt=1.0, gt=None, gte=None, lte=None), geo_bounding_box=None, geo_radius=None, geo_polygon=None, values_count=None)], must_not=None)))] min_should=None must=None must_not=None

Failed with filter should=None min_should=MinShould(conditions=[FieldCondition(key='nested_array[10][2]', match=None, range=Range(lt=-3.0, gt=None, gte=None, lte=None), geo_bounding_box=None, geo_radius=None, geo_polygon=None, values_count=None), FieldCondition(key='nested.array[].word', match=MatchValue(value='dragonfly'), range=None, geo_bounding_box=None, geo_radius=None, geo_polygon=None, values_count=None), IsNullCondition(is_null=PayloadField(key='maybe_null')), FieldCondition(key='city.geo', match=None, range=None, geo_bounding_box=GeoBoundingBox(top_left=GeoPoint(lon=168.37336192471815, lat=-67.63826214958465), bottom_right=GeoPoint(lon=157.81418784204902, lat=71.42237368935676)), geo_radius=None, geo_polygon=None, values_count=None)], min_count=3) must=None must_not=None