Quick answer
Qdrant is a vector database: it stores items as lists of numbers called vectors and finds the closest matches to a query, so a search for a light summer kurta returns cotton kurtas even when the words do not match exactly. It runs locally with one binary or a Docker container, no cloud account needed. This post loads eight products from a small Karachi clothing shop into Qdrant and searches them by meaning.
A customer types "light cotton kurta for summer" into a shop search box. The shop has exactly that item, a white cotton kurta for Rs 2,450, but the search box only knows keyword matching. The product title says White Cotton Kurta, the customer wrote "light", and "light" never appears in the title, so the best match sits on page three while a black silk formal kurta shows up first because it happens to contain the word kurta. The stock is right, the search is wrong. Keyword search compares letters. Vector search compares meaning, and a vector database is the tool that makes that comparison fast at scale. Qdrant is one of the simplest, and runs locally.
What I would check before using it
My first check is whether the search problem actually needs meaning. Keyword search is fine for exact product names or SKUs, and the Meilisearch Tutorial: Instant Search Without the Heavy Setup post and the Typesense Tutorial: Search That Forgives Typos Fast post cover the keyword side. Vector search earns its place when customers describe what they want in their own words, and no catalogue keyword matches.
My second check is where the vectors come from. Something has to turn each product into numbers first, and in production that is an embedding model; the Ollama Tutorial: Run Your First Local LLM in Python post shows how to run one on your own machine. Here the vectors are hand-built from product traits, so the search only understands the eight traits I coded in.
My third check is scale. Qdrant runs as a single binary and persists to disk, enough for a catalogue of hundreds or thousands of items. If the shop already runs Postgres, the PostgreSQL Explained: The Reliable Database You Default To post is worth reading first, because Postgres with pgvector holds vectors beside the orders, and one database is less to operate than two. Vectors also go stale when a product changes, so the shop needs a step that re-embeds a product whenever its catalogue row changes.
My verdict, as judgement: adopt Qdrant when shoppers describe products in their own words and keyword search keeps missing. It flips for a small catalogue where keyword search works, or if nobody maintains the embedding step.
A Karachi shop catalogue, searched by meaning
The demo is a small Karachi clothing shop with eight products, priced in rupees. Each product gets an 8-number vector, one number per trait: cotton, lawn, silk, formal, casual, summer, winter, embroidered. These hand-built vectors stand in for model embeddings.
Start Qdrant. The usual route is Docker:
$ docker run -p 6333:6333 -p 6334:6334 qdrant/qdrant
I ran the standalone binary instead, because Docker would not start here:
$ ./qdrant
Qdrant HTTP listening on 6333
Qdrant gRPC listening on 6334
Create a collection called shop_products with 8-dimensional vectors and cosine distance:
$ curl -X PUT http://localhost:6333/collections/shop_products \
-H 'Content-Type: application/json' \
-d '{"vectors": {"size": 8, "distance": "Cosine"}}'
{"result":true,"status":"ok"}
The script below is plain Python with only the standard library:
import json
import urllib.request
BASE = "http://localhost:6333"
def call(method, path, body=None):
req = urllib.request.Request(
BASE + path,
data=json.dumps(body).encode() if body is not None else None,
method=method,
headers={"Content-Type": "application/json"},
)
try:
with urllib.request.urlopen(req) as resp:
return resp.status, json.loads(resp.read())
except urllib.error.HTTPError as e:
return e.code, json.loads(e.read())
PRODUCTS = [
(1, "White Cotton Kurta", 2450, [1.0, 0.0, 0.0, 0.0, 0.8, 1.0, 0.0, 0.0]),
(2, "Embroidered Lawn Suit, 3 Piece", 4850, [0.0, 1.0, 0.0, 0.0, 0.5, 1.0, 0.0, 1.0]),
(3, "Black Silk Formal Kurta", 6200, [0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0]),
(4, "Pastel Lawn Kurta", 1950, [0.0, 1.0, 0.0, 0.0, 0.8, 1.0, 0.0, 0.0]),
(5, "Navy Blue Shalwar Kameez", 3100, [1.0, 0.0, 0.0, 0.0, 0.9, 0.5, 0.0, 0.0]),
(6, "Embroidered Silk Bridal Kurta", 12500, [0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0]),
(7, "Khaddar Winter Kurta", 2800, [0.0, 0.0, 0.0, 0.0, 0.8, 0.0, 1.0, 0.0]),
(8, "Printed Cotton Lawn Dress", 2150, [1.0, 1.0, 0.0, 0.0, 0.8, 1.0, 0.0, 0.0]),
]
# Create the collection: 8-dimensional vectors, cosine distance
status, body = call("PUT", "/collections/shop_products", {
"vectors": {"size": 8, "distance": "Cosine"},
})
print("create collection:", status, json.dumps(body["status"]))
# The first insert: the helper pads each vector to 12 numbers
bad_points = []
for pid, name, price, vec in PRODUCTS:
bad_points.append({
"id": pid,
"vector": vec + [0.0, 0.0, 0.0, 0.0],
"payload": {"name": name, "price_rs": price},
})
status, body = call("PUT", "/collections/shop_products/points?wait=true",
{"points": bad_points})
print("upsert 12-dim vectors:", status)
print(json.dumps(body, indent=2)[:600])
# The fix: the 8-number vectors as built
good_points = [
{"id": pid, "vector": vec, "payload": {"name": name, "price_rs": price}}
for pid, name, price, vec in PRODUCTS
]
status, body = call("PUT", "/collections/shop_products/points?wait=true",
{"points": good_points})
print("upsert 8-dim vectors:", status, json.dumps(body["status"]))
# Search for "light cotton kurta for hot summer days"
query = [1.0, 0.0, 0.0, 0.0, 0.8, 1.0, 0.0, 0.0]
status, body = call("POST", "/collections/shop_products/points/search", {
"vector": query,
"limit": 3,
"with_payload": True,
})
print("search status:", status)
for hit in body["result"]:
p = hit["payload"]
print(f" score {hit['score']:.4f} {p['name']} Rs {p['price_rs']}")
The first insert failed: the helper padded each vector to 12 numbers, but the collection expects 8. Qdrant answered with a plain HTTP 400:
upsert 12-dim vectors: 400
{
"status": {
"error": "Wrong input: Vector dimension error: expected dim: 8, got 12"
},
"time": 0.017843219
}
Send vectors with exactly the size the collection was created with. By default Qdrant only acknowledges an upsert, so this error only surfaced because the request used ?wait=true. Fixed to 8 numbers, the insert returned 200 and all 8 points landed, status green.
The search for "light cotton kurta for hot summer days" became the query vector [1.0, 0.0, 0.0, 0.0, 0.8, 1.0, 0.0, 0.0]:
search status: 200
score 1.0000 White Cotton Kurta Rs 2450
score 0.9520 Navy Blue Shalwar Kameez Rs 3100
score 0.8516 Printed Cotton Lawn Dress Rs 2150
The white cotton kurta wins with a perfect 1.0000, the result keyword search missed. Second place surprises: the navy shalwar kameez outranks the printed cotton lawn dress. Cosine similarity compares direction, not word overlap, and the dress carries a lawn trait the query never asked for.
Common mistakes and how to fix them
First, sending vectors of the wrong size. The symptom is the error above, "Vector dimension error: expected dim: 8, got 12", or a search that returns nothing. The fix is to make the embedding output match the collection size exactly, and to use ?wait=true while testing so mistakes surface at once.
Second, forgetting to ask for the payload. The symptom is search results showing only ids and scores, with no product names or prices. The fix is to add "with_payload": true to the search request, so each hit carries the stored details.
Third, picking the wrong distance. The symptom is odd rankings, like a formal silk kurta scoring well for summer, because Euclidean distance reacts to vector length while cosine reacts to direction. The fix is to use Cosine for text-style embeddings, or normalise the vectors first.
Fourth, editing a product and forgetting its vector. The symptom is search returning the old description, because the payload changed but the stored vector still describes the old one. The fix is to re-embed and upsert the point whenever the catalogue row changes.
Frequently Asked Questions
Do I need a GPU or a cloud account to try Qdrant? No. Qdrant runs on a laptop as one binary or one container, and this whole post ran locally. A GPU only matters for the embedding model.
What is a vector, in plain words? A list of numbers that stands in for meaning. Similar items get similar numbers, so "cotton kurta" and "light summer shirt" point the same way.
How is Qdrant different from Elasticsearch or Meilisearch? Keyword engines match words and tolerate typos; Qdrant matches meaning. The Typesense Tutorial: Search That Forgives Typos Fast post shows the keyword side, and many shops use both.
Can I use Qdrant with data I already have in Postgres? Yes. Keep the catalogue in Postgres and store the vectors in Qdrant, linked by the same product id, or use the pgvector extension inside Postgres instead. The PostgreSQL Explained: The Reliable Database You Default To post covers the Postgres side.
What to remember
- A vector is a list of numbers that stands in for meaning.
- A Qdrant collection fixes the vector size and distance measure when it is created.
- Upserts only acknowledge by default, so use
?wait=truewhile testing. - Search with
"with_payload": trueto get product details back. - Re-embed a product whenever its catalogue details change.
Where this leaves you
The shop search started with a customer typing "light cotton kurta for summer" and the right product buried on page three. Eight hand-built vectors and one local Qdrant collection later, that query returns the white cotton kurta first with a perfect score, and the dimension mismatch taught the rule that matters most: the vectors and the collection must agree on size. Take a catalogue of your own, turn each item into numbers, and search with a description instead of keywords.
Further reading
- Qdrant documentation
- Qdrant quickstart
- Qdrant collections
- Meilisearch Tutorial: Instant Search Without the Heavy Setup
- Typesense Tutorial: Search That Forgives Typos Fast
- Ollama Tutorial: Run Your First Local LLM in Python
- PostgreSQL Explained: The Reliable Database You Default To
- DuckDB: Analytics Queries on a File, Without a Server
Waqas Shahid is a software engineer from Karachi with more than 12 years of experience, including 6+ years in engineering leadership. He writes The Practical Developer.
Originally published at https://practicaldevblog.blogspot.com/2026/11/qdrant-vector-search-shop.html

Top comments (0)