I’m using the field-start and field-end modifiers to match a full word, but when there is a foreign character in the query string the modifiers are matching wrongly.
For example:
SELECT * FROM geonames WHERE MATCH('@(location,country) "^b$"/1') limit 1 OPTION field_weights=(country=10, location=3);
Matches Bû
When it should be an empty set.
Same with:
SELECT * FROM geonames WHERE MATCH('@(location,country) "^si$"/1') limit 1 OPTION field_weights=(country=10, location=3);
Which matches Osi because O is a foreign character.
However this query:
SELECT * FROM geonames WHERE MATCH('@(location,country) "^liver$"/1') limit 1 OPTION field_weights=(country=10, location=3);
Returns an empty set because it can only match Liverpool which does not contain foreign characters.
What can I do about this? I can’t have single character queries finding matches.
Thanks