When building the regular expression for a facet query, createRegexQuery runs the following check, which takes any lowercase letters and adds an uppercase equivalent in a group to allow for case insensitivity. However this does not do the inverse. For example, the following transformation works as expected:
hello => [hH][eE][lL][lL][oO]
But the following don't do the same thing for uppercase to lowercase:
Input
Expectation
Actual
Hey
[hH][eE][yY]
H[eE][yY]
HeY
[hH][eE][yY]
H[eE]Y
HEY
[hH][eE][yY]
HEY
It feels like whatever is input here should be converted into upper and lower case to account for the lack of case sensitivity in a term query.
I'm happy to provide a PR to amend the createRegexQuery function if this is an issue that you'd be open to having fixed?
Environment
Searchkit version (or git revision) that exhibits the issue: 4.12.0
Last Searchkit version that did not exhibit the issue (if applicable): Unknown
The problem
When building the regular expression for a facet query,
createRegexQuery
runs the following check, which takes any lowercase letters and adds an uppercase equivalent in a group to allow for case insensitivity. However this does not do the inverse. For example, the following transformation works as expected:hello
=>[hH][eE][lL][lL][oO]
But the following don't do the same thing for uppercase to lowercase:
[hH][eE][yY]
H[eE][yY]
[hH][eE][yY]
H[eE]Y
[hH][eE][yY]
HEY
It feels like whatever is input here should be converted into upper and lower case to account for the lack of case sensitivity in a term query.
I'm happy to provide a PR to amend the createRegexQuery function if this is an issue that you'd be open to having fixed?
Environment
Details
See above
Code To Reproduce Issue
Mario
andmario
return resultsMaRiO
andMARIO
do not return results