ну сложность что експандилку переписать надо чтобы она
учитывала escapeing пропускала его
обрабатывала escape символы как обычные
корректно длину перфиксов \ инфиксов после этого считала
ну и не начала втромаживать на всех этих проверках для не escape слов
It works fine in mysql and elastic:
mysql> select * from t;
+------+--------+
| id | Doc |
+------+--------+
| 1 | abcdef |
| 2 | abc_ef |
+------+--------+
2 rows in set (0.00 sec)
mysql> select * from t where Doc like 'abc\_ef';
+------+--------+
| id | Doc |
+------+--------+
| 2 | abc_ef |
+------+--------+
1 row in set (0.00 sec)
mysql> select * from t where Doc like 'abc_ef';
+------+--------+
| id | Doc |
+------+--------+
| 1 | abcdef |
| 2 | abc_ef |
+------+--------+
2 rows in set (0.00 sec)
Right now it's impossible to match word "abc?def" by doing smth like
select * from idx where match('abc\\?def');
This is by design and there's an issue about this in Sphinx bugtracker http://sphinxsearch.com/bugs/view.php?id=1381. Some users even had to migrate to Elastic because of this.
Let's improve this so it's possible.
Few words from Stas from slack https://manticoresearch.slack.com/archives/C5EEXJG31/p1524816195000483:
It works fine in mysql and elastic: