BUG: Strange Case-Sensitive Bug with Site Search

Using the Docs Demo site as an example, where there is a standard site search implementation (https://docs.treepl.co/demo-cs/_search-results).
If you search using 2 keywords, in upper or lower case, the search is fine.
But if you use 3 keywords and the middle word has any uppercase letters the search will retrieve nothing. Even when using the exact name of an item.

For example, there is a page called ‘Basic Menu Example’ (named with title-case in the admin).
Running a search using any of the below combinations works fine:
basic menu example
Basic menu example
MENU basic EXAMPLE

But if you make any letter in the middle word a capital the search fails, eg:
Basic Menu Example
basic MENU example
basic meNu example
menu Basic example

It’s a bit of an edge case scenario, except when using the exact match term (Basic Menu Example) which is a little worrying as that should definitely work.

My only guess as to what’s happening here is that the search engine is looking for middle words in uppercase to use as conditional operators, eg:
‘menu’ AND ‘example’
‘menu’ OR ‘example’
‘menu’ NOT ‘example’
…but we don’t have these search operators available to us in site search…?

At any rate, something is amiss and it would be good if site search wasn’t case sensitive in any way.

Additionally, this issue doesn’t appear to happen with module specific search - only Site Search.

Att: @vlad.z @Eugene

1 Like

Hi @Adam.Wilson.
Noted and added to the bugfix. Thank you for the notice.