Repository navigation
fix: create missing payload indexes on existing collections - #216
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AstraBert
approved these changes
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The server creates the payload indexes for
FILTERABLE_FIELDSonly when it creates the collection. They're never created when:On collections in strict mode, the default on Qdrant Cloud, every
qdrant-findthat uses the field then fails:Elsewhere, filtering on the field works but without an index.
Changes
QdrantConnector._create_missing_indexes()compares the configured indexes with the collection'spayload_schemaand creates the missing ones._ensure_collection_exists()(store) andsearch()(find) call it with the collection info they already fetch, so there's no extra request when nothing is missing.search()needs it too: in read-only mode,qdrant-storeis disabled and never runs.create_payload_indexcall.Testing
New tests in
tests/test_payload_indexes.py: indexes created from store and from search, existing indexes left alone, local mode untouched, a 403 logs a warning without failing the search, and other errors are raised. Five of the six fail without the fix. The full suite andpre-commitpass.Against Qdrant 1.20.0, with a collection created outside the server, in strict mode, and a
metadata.langkeyword field configured:🤖 Generated with Claude Code