Open robdekort opened 4 months 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.
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.
Ah yeah that’s great as well.
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 between
query_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 towhole
.