Proposal:
Problem
It’s currently impossible to find iphone 17 using iphone17. For example:
mysql> drop table if exists t; create table t(f text); insert into t values(1, 'iphone 17'); select * from t where match('iphone17'); show meta;
--------------
drop table if exists t
--------------
Query OK, 0 rows affected (0.006 sec)
--------------
create table t(f text)
--------------
Query OK, 0 rows affected (0.003 sec)
--------------
insert into t values(1, 'iphone 17')
--------------
Query OK, 1 row affected (0.001 sec)
--------------
select * from t where match('iphone17')
--------------
Empty set (0.001 sec)
--- 0 out of 0 results in 0ms ---
--------------
show meta
--------------
+----------------+----------+
| Variable_name | Value |
+----------------+----------+
| total | 0 |
| total_found | 0 |
| total_relation | eq |
| time | 0.000 |
| keyword[0] | iphone17 |
| docs[0] | 0 |
| hits[0] | 0 |
+----------------+----------+
7 rows in set (0.000 sec)
There's bigram_index, but it doesn't help because it inserts a special character between the tokens.
Proposal
Add a new setting: bigram_delimiter = {none|true|both}. bigram_delimiter = true is the current behavior. For bigram_delimiter = none, the words should be concatenated without a delimiter. For bigram_delimiter = both, it should produce both the delimited and non-delimited tokens.
Checklist:
To be completed by the assignee. Check off tasks that have been completed or are not applicable.
Details
Proposal:
Problem
It’s currently impossible to find
iphone 17usingiphone17. For example:There's bigram_index, but it doesn't help because it inserts a special character between the tokens.
Proposal
Add a new setting:
bigram_delimiter = {none|true|both}.bigram_delimiter = trueis the current behavior. Forbigram_delimiter = none, the words should be concatenated without a delimiter. Forbigram_delimiter = both, it should produce both the delimited and non-delimited tokens.Checklist:
To be completed by the assignee. Check off tasks that have been completed or are not applicable.
Details