Prompt

how to index embeddings in qdrant with filters

Artificial Intelligence / AI Search2 observationsLast seen Oct 17, 2026

Latest observation

Oct 17, 2026OpenAI APIWeb search: off

In Qdrant, you usually don’t index embeddings “with filters” directly in the vector index. Instead:

  • Vectors are indexed for similarity search.
  • Payload fields are indexed separately so Qdrant can filter candidate points efficiently before/during vector search.

Typical setup

1) Store vectors + payload

Each point has:

  • an id
  • a vector embedding
  • metadata/payload fields you want to filter on

Example payload:

{
  "tenant_id": "acme",
  "category": "invoice",
  "created_at": 1720000000,
  "tags": ["finance", "pdf"]
}

2) Create payload indexes on filterable fields

If you want fast filtering, create payload indexes for fields you’ll query often.

Python

from qdrant_client import QdrantClient
from qdrant_client.http import models

client = QdrantClient(host="localhost", port=6333)

client.create_payload_index(
    collection_name="my_collection",
    field_name="tenant_id",
    field_schema=models.PayloadSchemaType.KEYWORD,
)

client.create_payload_index(
    collection_name="my_collection",
    field_name="category",
    field_schema=models.PayloadSchemaType.KEYWORD,
)

client.create_payload_index(
    collection_name="my_collection",
    field_name="created_at",
    field_schema=models.PayloadSchemaType.INTEGER,
)

Common field types:

  • KEYWORD for exact match strings
  • INTEGER / FLOAT
  • BOOL
  • DATETIME
  • GEO
  • TEXT (for text indexing / full-text search, if enabled)

3) Query with a filter + vector

You then pass the filter when searching:

Python example

results = client.search(
    collection_name="my_collection",
    query_vector=[0.1, 0.2, 0.3, 0.4],
    limit=10,
    query_filter=models.Filter(
        must=[
            models.FieldCondition(
                key="tenant_id",
                match=models.MatchValue(value="acme")
            ),
            models.FieldCondition(
                key="category",
                match=models.MatchValue(value="invoice")
            ),
        ]
    )
)

Filter examples

Exact match

models.FieldCondition(
    key="tenant_id",
    match=models.MatchValue(value="acme")
)

Range

models.FieldCondition(
    key="created_at",
    range=models.Range(gte=1720000000, lt=1730000000)
)

List contains

models.FieldCondition(
    key="tags",
    match=models.MatchValue(value="finance")
)

How Qdrant uses the indexes

  • The vector index finds nearest embeddings.
  • The payload index helps narrow down points matching filters.
  • Qdrant may:
    • filter first, then search within matching points
    • or search and then apply filtering, depending on the query and index structure

For selective filters, payload indexes can make a big difference.


Important notes

You cannot make the vector index itself “filter-aware”

Instead, use:

  • payload indexing for metadata
  • filter clauses in search/query requests

Use named vectors if needed

If you store multiple embeddings per point, define named vectors in the collection and search the one you want.

For best performance

  • Index fields you filter on frequently
  • Prefer low-cardinality exact-match filters for payload indexes
  • Avoid indexing every field if not needed

Example collection creation

client.create_collection(
    collection_name="my_collection",
    vectors_config=models.VectorParams(
        size=384,
        distance=models.Distance.COSINE
    )
)

Then insert points with payload:

client.upsert(
    collection_name="my_collection",
    points=[
        models.PointStruct(
            id=1,
            vector=[0.1]*384,
            payload={"tenant_id": "acme", "category": "invoice"}
        )
    ]
)

If you want, I can also give you:

  1. a full Python example end-to-end, or
  2. the equivalent REST API example, or
  3. advice on which payload fields should be indexed for your schema.

Brands

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (2 observations for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.