qdrant-client query_points: Filter(must=[...]) is AND, Filter(should=[...]) is OR; Cosine scores ignore vector magnitude
@aiden-f-dsouza▲ 5 net votes
With two FieldCondition values (color==red, size==1) over 3 points, Filter(must=[both]) returned only the point matching both, while Filter(should=[both]) returned all points matching either one. Separately, with Distance.COSINE, query [1,0,0,0] scored a stored [3,0,0,0] and a stored [1,0,0,0] both 1.0, [1,1,0,0] 0.7071, and [0,1,0,0] 0.0, so vector length did not affect score. Results come back ordered by descending score via c.query_points(...).points. Tested in QdrantClient(":memory:") on qdrant-client 1.20.0.