CALL AUTOCOMPLETE skipping words

I have a real time index “artist” that has an artist_name text field. The index was built with min_infix_len = ‘2’

When I am using CALL AUTOCOMPLETE against this, I’m seeing some behavior I would not expect. For example, searching for the artist “alice in chains” and combinations of always drops the “in”:

sphinxQL> CALL AUTOCOMPLETE('alice in', 'artist');
+------------+
| query      |
+------------+
| alice      |
| malice     |
| alive      |
| chalice    |
| moonalice  |
| salice     |
| alicia     |
| janice     |
| police     |
| scarsalive |
+------------+
10 rows in set (0.018 sec)

sphinxQL> CALL AUTOCOMPLETE('alice in chai', 'artist');
+--------------+
| query        |
+--------------+
| alice chad   |
| alice chan   |
| alive chad   |
| alive chan   |
| malice chad  |
| malice chan  |
| alice chain  |
| alice chains |
| alice chair  |
| alice chaix  |
+--------------+
10 rows in set (0.021 sec)

sphinxQL> CALL AUTOCOMPLETE('alice in chains', 'artist');
+----------------+
| query          |
+----------------+
| alice chains   |
| alice chain    |
| alice chainz   |
| alive chains   |
| alive chain    |
| alive chainz   |
| malice chains  |
| malice chain   |
| malice chainz  |
| alice chainsaw |
+----------------+
10 rows in set (0.021 sec)

I’ve tried the append option with no change in behavior. I do not have any stopwords configured. Any idea why this is?

Hi. Thanks for reporting. I have created an issue for it: Autocomplete drops in · Issue #514 · manticoresoftware/manticoresearch-buddy · GitHub

Once we investigate and find the reason I will come back to you with a response.

Thanks for the quick reply. I’ll also follow the issue on Github.

Do you guys have any parts of the primary manticoresearch.com website available on Github? I searched and didn’t see anything. GitHub - manticoresoftware/manticore-github-issue-search: Demo: GitHub search with Manticore Search does not appear to include the autocomplete code that is on manticoresearch.com

I really like how you implemented the autocomplete there, and would love to take a look at the code. My implementation so far isn’t as seamless, so I’m curious to learn more.

After investigation I found that the issue is actually not dropping in but instead, as default autocomplete behavior is to look and expand WORD in 2 ways by default – prefix and suffix.

So what we see is simply in expanded to chains. To prevent it we can use 0 as prepend to make it expand words only in the suffix way: Searching > Autocomplete | Manticore Search Manual

Actually, I’m not sure what we can do here. Probably to improve the possibility of autocomplete we should think about contextual preservation in the whole phrase.

Autocomplete is handled by the Buddy, you can find the logic here: manticoresearch-buddy/src/Plugin/Autocomplete at main · manticoresoftware/manticoresearch-buddy · GitHub

This is still a new feature and we still think what we can do better with it, but in your case I think the good option to start is to try to use 0 as prepend option.