manticoresoftware / manticore-github-issue-search

Demo: GitHub search with Manticore Search
https://github.manticoresearch.com
6 stars 2 forks source link

Consider enabling bigram_index to improve autocomplete #31

Open sanikolaev opened 1 month ago

sanikolaev commented 1 month ago

Here

image

The autocomplete results could be better if they included native support. It's currently impossible likely because bigram_index is not enabled. If we do it, the results may be better. E.g.:

mysql> drop table if exists t; create table t(f text) min_infix_len='2' bigram_index='all'; insert into t(f) values('abc def'),('abc'),('def'); call autocomplete('ab', 't');
--------------
drop table if exists t
--------------

Query OK, 0 rows affected (0.00 sec)

--------------
create table t(f text) min_infix_len='2' bigram_index='all'
--------------

Query OK, 0 rows affected (0.00 sec)

--------------
insert into t(f) values('abc def'),('abc'),('def')
--------------

Query OK, 3 rows affected (0.01 sec)

--------------
call autocomplete('ab', 't')
--------------

+---------+
| query   |
+---------+
| abc     |
| abc def |
+---------+
2 rows in set (0.01 sec)

Let's experiment with it and consider enabling it for the demo.