Skip to content

pre-filter neural query#2828

Merged
abeglova merged 1 commit intomainfrom
ab/pre-filter-neural-query
Jan 5, 2026
Merged

pre-filter neural query#2828
abeglova merged 1 commit intomainfrom
ab/pre-filter-neural-query

Conversation

@abeglova
Copy link
Contributor

@abeglova abeglova commented Dec 19, 2025

What are the relevant tickets?

https://github.com/mitodl/hq/issues/9375

Description (What does it do?)

This pr speeds up opensearch hybrid search by moving the search filter into the the neural query. This speeds up the search by reducing the number of records that need to be considered by the neural query

How can this be tested?

follow the instructions in #2808 if you don't have the hybrid search index set up yet

verify that both the regular search and hybrid search (search_mode=hybrid added to the url or selected from the admin searchoptions) works

@abeglova abeglova marked this pull request as ready for review December 20, 2025 00:12
@shanbady shanbady self-assigned this Jan 5, 2026
Copy link
Contributor

@shanbady shanbady left a comment

Choose a reason for hiding this comment

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

LGTM - left a minor comment about missing docstring


def add_text_query_to_search(
search, text, search_params, query_type_query, use_hybrid_search
def add_text_query_to_search( # noqa: PLR0913
Copy link
Contributor

Choose a reason for hiding this comment

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

missing docstring

@abeglova abeglova force-pushed the ab/pre-filter-neural-query branch from 5a33e90 to 0663ce0 Compare January 5, 2026 16:56
@abeglova abeglova merged commit ec3d27d into main Jan 5, 2026
13 checks passed
@abeglova abeglova deleted the ab/pre-filter-neural-query branch January 5, 2026 18:09
@odlbot odlbot mentioned this pull request Jan 5, 2026
8 tasks
abeglova added a commit that referenced this pull request Jan 13, 2026
abeglova added a commit that referenced this pull request Jan 13, 2026
This was referenced Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants