matching hyphenated words #972
thecodemonkey86
started this conversation in
General
Replies: 2 comments
-
The Arantor's reply still makes sense. As a general solution this works fine for me: mysql> drop table if exists t; create table t(f text) charset_table='non_cjk, -'; insert into t values(1,'a-b'); select * from t where match('a-b'); show meta;
--------------
drop table if exists t
--------------
Query OK, 0 rows affected (0.00 sec)
--------------
create table t(f text) charset_table='non_cjk, -'
--------------
Query OK, 0 rows affected (0.01 sec)
--------------
insert into t values(1,'a-b')
--------------
Query OK, 1 row affected (0.00 sec)
--------------
select * from t where match('a-b')
--------------
+------+------+
| id | f |
+------+------+
| 1 | a-b |
+------+------+
1 row in set (0.00 sec)
--------------
show meta
--------------
+----------------+-------+
| Variable_name | Value |
+----------------+-------+
| total | 1 |
| total_found | 1 |
| total_relation | eq |
| time | 0.000 |
| keyword[0] | a-b |
| docs[0] | 1 |
| hits[0] | 1 |
+----------------+-------+
7 rows in set (0.00 sec) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sorry, forgot about this one. Yes, adding hyphen to charset_table solved this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, we are having issues matching hyphenated words. We found this very old thread http://sphinxsearch.com/forum/view.html?id=2876 where this topic has been discussed. Is this valid in Manticore 5.0.2 or later? (or has it ever been valid?)
Beta Was this translation helpful? Give feedback.
All reactions