Skip to content

Search: experiment with bool prefix query #10568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
stsewd opened this issue Jul 25, 2023 · 2 comments
Open

Search: experiment with bool prefix query #10568

stsewd opened this issue Jul 25, 2023 · 2 comments
Labels
Needed: design decision A core team decision is required

Comments

@stsewd
Copy link
Member

stsewd commented Jul 25, 2023

What's the problem this feature will solve?

When searching, you get results from exact words, for example if you search for "config", you don't get results from "configuration".

Describe the solution you'd like

Have a way to enable "prefix" search for a given query, similar to fuzzy search, start with a feature flag, and move it to a search time option.

We can use https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-bool-prefix-query.html and maybe complement with https://www.elastic.co/guide/en/elasticsearch/reference/7.17/index-prefixes.html to see if it improves performance, I think we can apply those changes independently.

Alternative solutions

We have fuzzy search, but it's slow, and will also return results that may not be related, since it's fuzzy!

We also have the option to use config*, but it may not be obvious to users.

Additional context

ref readthedocs/readthedocs-sphinx-search#142

We also tried to implement wildcard search a time ago, but it slowed down everything #8284.

@humitos
Copy link
Member

humitos commented Jul 26, 2023

We also have the option to use config*, but it may not be obvious to users.

I'd say we can implement this as the first option before jumping too deep into this feature. The new UI it's going to be more clear about what is the syntax allowed when searching. See readthedocs/addons#33

@stsewd
Copy link
Member Author

stsewd commented Aug 10, 2023

I'd say we can implement this as the first option before jumping too deep into this feature.

This is already possible, we don't have to do anything, users just need to add * to their search term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

2 participants