When doing an exact search unexpected results appear. EG if i have a field with OSCA3 but search 'sku::"OSCA"' i shouldn't expect the entry with OSCA3 to appear but it does. Having looked at the DB query craft adds a % to the end of the string resulting in the search returning anything starting with OSCA. But the double quotes should return only fields that have an exact match.
Steps to reproduce
Add text field called sku and add to section
Create multiple entries with data such as OSCA1, OSCA2, OSCA3
Should return nothing, but instead it will return all 3 entries due to resulting query:
SELECT elementId
FROM searchindex
WHERE ((fieldId = '35') AND (keywords LIKE ' osca%')) AND (siteId=1)
Additional info
Craft version: Craft Pro 3.0.31
PHP version: 7.0.32
Database driver & version: MySQL
Possible Cause
Setting subRight to false resolves the issue but that might cause an issue for non-quoted searches, so the bug is probably "subLeft and subRight should be ignored for exact match searches"
Description
When doing an exact search unexpected results appear. EG if i have a field with OSCA3 but search 'sku::"OSCA"' i shouldn't expect the entry with OSCA3 to appear but it does. Having looked at the DB query craft adds a % to the end of the string resulting in the search returning anything starting with OSCA. But the double quotes should return only fields that have an exact match.
Steps to reproduce
Additional info
Possible Cause
Setting subRight to false resolves the issue but that might cause an issue for non-quoted searches, so the bug is probably "subLeft and subRight should be ignored for exact match searches"