statamic / ideas

đŸ’¡Discussions on ideas and feature requests for Statamic
https://statamic.dev
30 stars 1 forks source link

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

Open robdekort opened 4 days ago

robdekort commented 4 days ago

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 commented 4 days ago

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 commented 4 days ago

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 commented 4 days ago

Ah yeah that’s great as well.