My index configuration:
index my_index
{
# ...
type = rt
phrase_boundary = ., ?, U+2026
charset_table = 0..9, english, russian, _
dict = keywords
min_word_len = 1
min_infix_len = 1
preopen = 1
rt_field = title
infix_fields = title
}
I'm using sphinxsearch 2.2.7. I'm trying to search with the next query:
mysql> select COUNT(*) from my_index WHERE match('*cc*');
+----------+
| count(*) |
+----------+
| 63 |
+----------+
1 row in set (0.00 sec)
It works well.
But if I try to search by one character, it gives no results:
mysql> select COUNT(*) from my_index WHERE match('*c*');
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)
I've tried the same config with a mysql-datasource-based index, got the same results. Yes, I did reindex many times after reconfiguration. Is it bug in sphinx?
EDIT: show meta; and show plan; results:
mysql> select COUNT(*) from my_index WHERE match('*cc*');
+----------+
| count(*) |
+----------+
| 63 |
+----------+
1 row in set (0.00 sec)
mysql> SHOW PLAN;
+------------------+------------------------------------------+
| Variable | Value |
+------------------+------------------------------------------+
| transformed_tree | AND(KEYWORD(*cc*, querypos=1, expanded)) |
+------------------+------------------------------------------+
1 row in set (0.00 sec)
mysql> SHOW META;
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| total | 1 |
| total_found | 1 |
| time | 0.000 |
| keyword[0] | *cc* |
| docs[0] | 63 |
| hits[0] | 63 |
+---------------+-------+
6 rows in set (0.00 sec)
mysql> select COUNT(*) from my_index WHERE match('*c*');
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)
mysql> SHOW PLAN;
+------------------+-----------------------------------------+
| Variable | Value |
+------------------+-----------------------------------------+
| transformed_tree | AND(KEYWORD(*c*, querypos=1, expanded)) |
+------------------+-----------------------------------------+
1 row in set (0.00 sec)
mysql> SHOW META;
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| total | 0 |
| total_found | 0 |
| time | 0.000 |
| keyword[0] | *c* |
| docs[0] | 0 |
| hits[0] | 0 |
+---------------+-------+
6 rows in set (0.00 sec)