Qdrant: Sorting Points with the PHP Client
I’ve been working on maintaining PHP client of Qdrant. If you’re unfamiliar with Qdrant, it’s a vector search engine designed to provide fast and efficient similarity searches, making it highly suitable for applications like recommendation systems, semantic search, and more. If you want to explore Qdrant further, make sure to check out the following repositories, and don’t forget to give them a star:
In this post, I’ll show you how to filter and sort points within a Qdrant collection using the PHP client, which was implemented in PHP Client recently.
Filtering and Sorting Points in a Collection
Imagine you have the following points stored in your Qdrant collection, and you need to scroll through these points, filtering them based on a specific payload field (e.g., color
) while sorting the results by another payload field (e.g., sort
).
{
"id": 1,
"payload": {"sort": 1, "color": "red"},
"vector": {"image": [0.9, 0.1, 0.1]}
},
{
"id": 2,
"payload": {"sort": 2, "color": "red"},
"vector": {"image": [0.1, 0.9, 0.1]}
},
{
"id": 3,
"payload": {"sort": 3, "color": "blue"},
"vector"…