Skip to content

Conversation

shanbady
Copy link
Contributor

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/8567

Description (What does it do?)

This PR fixes payload index to be the correct type and also includes changes that make sure that types stay in sync with what is defined in vector_search.constants

How can this be tested?

  1. checkout this branch
  2. restart celery
  3. run python manage.py generate_embeddings --all
  4. go to your local qdrant dashboard and verify that for the learning resources collection the "certification" is now "boolean" (in the payload indexes section under the info tab)
  5. open up vector_search/constants.py and change one of the payload field types for example: "course_number": models.PayloadSchemaType.INTEGER, to "course_number": models.PayloadSchemaType.KEYWORD,
  6. reload celery
  7. re-run the generate embeddings command
  8. go back to the qdrant dashboard and note that the type associated with the field has changed.

@shanbady shanbady marked this pull request as ready for review September 30, 2025 17:20
@shanbady shanbady added the Needs Review An open Pull Request that is ready for review label Sep 30, 2025
@mbertrand mbertrand self-assigned this Oct 1, 2025
Copy link
Member

@mbertrand mbertrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving in case this is urgent, but if not it would be good to add some unit tests for the update_qdrant_indexes function

collection_name=collection_name,
field_name=index_field,
field_schema=indexes[index_field],
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed there's no unit tests for this function, would be good to add some. Could be this PR if there's no rush to get this out, otherwise in a subsequent PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call. added some tests

@shanbady shanbady requested a review from mbertrand October 1, 2025 17:13
Copy link
Member

@mbertrand mbertrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@shanbady shanbady merged commit 9d9d096 into main Oct 3, 2025
13 checks passed
@shanbady shanbady deleted the shanbady/recommendation-bot-search-errors branch October 3, 2025 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review An open Pull Request that is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants