Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce Qdrant storage/memory overhead by removing unused payload indexes for the content_files embeddings collection, keeping only the fields intended for frequent filtering/faceting.
Changes:
- Removed multiple fields from
QDRANT_CONTENT_FILE_INDEXESto reduce payload index footprint. - Added an inline note to encourage intentional selection of indexed fields.
OpenAPI Changes5 changes: 0 error, 5 warning, 0 info Unexpected changes? Ensure your branch is up-to-date with |
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.
What are the relevant tickets?
Closes https://github.com/mitodl/hq/issues/10782
Description (What does it do?)
This PR removes unnecessary fields from the payload index in Qdrant. clients in mit-learn and learn-ai that call the contentfile vector endpoint only use a few fields to filter by. In Qdrant - each field we decide to add to the payload index introduces significant storage and memory requirements in addition to performance hits since it needs to maintain new HNSW graphs so we should be intentional about what is actually added there.
This PR also contains a small bugfix for an issue where the learning resource responses were not sorted by score
How can this be tested?
On the live performance side of things I have validated it on the RC qdrant cluster.
python manage.py generate_embeddings --coursesChecklist: