-
Notifications
You must be signed in to change notification settings - Fork 301
Open
Description
Solarium version(s) affected: 6.3.*
Solr version: all
Solr mode: standalone / cloud
Description
A term containing words and,or,to in lowercase are considered as AND OR TO solr operator.
Why is there a strtoupper before preg_match.
The term must contain upper AND OR TO, lower is not a problem!
Core/Query/Helper.php
public function escapeTerm(string $input): string
{
if (preg_match('/(^|\s)(AND|OR|TO)($|\s)/', strtoupper($input), $matches)) {
return $this->escapePhrase($input);
}
return preg_replace('/( |\+|-|&&|\|\||!|\(|\)|\{|}|\[|]|\^|"|~|\*|\?|:|\/|\\\)/', '\\\$1', $input);
}
How to reproduce
Use a term with "foo and bar"
Possible Solution
Suppress strtoupper in preg_match call.
Additional context
Metadata
Metadata
Assignees
Labels
No labels