Skip to content
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

Let users switch between query_mode with quotes in their search query #1191

Open
robdekort opened this issue Jun 28, 2024 · 3 comments
Open

Comments

@robdekort
Copy link

Statamic's default comb search is extremely powerful. There's one feature I'm currently missing however. And that is the ability for users to switch betweenquery_mode boolean/words vs whole.

For example:

query_mode = 'boolean': "Comb your hair" -> finds matches for "Comb" or "your" or "hair"
query_mode = 'words': "Comb your hair" -> finds matches for "Comb" and "your" and "hair"
query_mode = 'whole': "Comb your hair" -> finds matches for "Comb your hair"

Currently the query_mode is set on the index itself and is therefore global. It would be great if users could use "" to wrap their query and that would make it switch to whole.

@robdekort
Copy link
Author

Note: I'm not sure how other search engines handle the differences between boolean and words and if that is also configurable by the query or if it should be either boolean/words set as a search index property and offer the user to switch to whole by using quotes.

@jasonvarga
Copy link
Member

jasonvarga commented Jun 28, 2024

Good ideas. In some search engines you can use multiple sets of quotes in the query. like "comb your" "hair please". Would be cool if that just worked too.

@robdekort
Copy link
Author

Ah yeah that’s great as well.

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

No branches or pull requests

2 participants