Autocomplete.md.json 82 KB

123456789101112131415161718192021222324252627
  1. {
  2. "7ed396dff53c3b45a104375a399808d030f8a59fe4308d78fdb842165cd61dad": {
  3. "original": "There is an [article about it in our blog](https://manticoresearch.com/blog/simple-autocomplete-with-manticore/) and an [interactive course](https://play.manticoresearch.com/simpleautocomplete/). A quick example is:\n* Let's assume you have a document: `My cat loves my dog. The cat (Felis catus) is a domestic species of small carnivorous mammal.`\n* Then you can use `^`, `\"\"`, and `*` so as the user is typing, you make queries like: `^\"m*\"`, `^\"my *\"`, `^\"my c*\"`, `^\"my ca*\"` and so on\n* It will find the document, and if you also do [highlighting](../Searching/Highlighting.md), you will get something like: `<b>My cat</b> loves my dog. The cat ( ...`\n\n##### Autocomplete a word\nIn some cases, all you need is to autocomplete a single word or a couple of words. In this case, you can use `CALL KEYWORDS`.\n\n### CALL KEYWORDS\n`CALL KEYWORDS` is available through the SQL interface and offers a way to examine how keywords are tokenized or to obtain the tokenized forms of specific keywords. If the table enables [infixes](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#min_infix_len), it allows you to quickly find possible endings for given keywords, making it suitable for autocomplete functionality.\n\nThis is a great alternative to general infixed search, as it provides higher performance since it only needs the table's dictionary, not the documents themselves.\n\n### General syntax\n<!-- example keywords -->\nCODE_BLOCK_13\nThe `CALL KEYWORDS` statement divides text into keywords. It returns the tokenized and normalized forms of the keywords, and if desired, keyword statistics. Additionally, it provides the position of each keyword in the query and all forms of tokenized keywords when the table enables [lemmatizers](../Creating_a_table/NLP_and_tokenization/Morphology.md).\n\n| Parameter | Description |\n| - | - |\n| text | Text to break down to keywords |\n| table | Name of the table from which to take the text processing settings |\n| 0/1 as stats | Show statistics of keywords, default is 0 |\n| 0/1 as fold_wildcards | Fold wildcards, default is 0 |\n| 0/1 as fold_lemmas | Fold morphological lemmas, default is 0 |\n| 0/1 as fold_blended | Fold blended words, default is 0 |\n| N as expansion_limit | Override [expansion_limit](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#expansion_limit) defined in the server configuration, default is 0 (use value from the configuration) |\n| docs/hits as sort_mode | Sorts output results by either 'docs' or 'hits'. No sorting is applied by default. |\n| jieba_mode | Jieba segmentation mode for the query. See [jieba_mode](../Creating_a_table/NLP_and_tokenization/Morphology.md#jieba_mode) for more details |\n\nThe examples show how it works if assuming the user is trying to get an autocomplete for \"my cat ...\". So on the application side all you need to do is to suggest the user the endings from the column \"normalized\" for each new word. It often makes sense to sort by hits or docs using `'hits' as sort_mode` or `'docs' as sort_mode`.\n\n<!-- intro -->\n##### Examples:\n\n<!-- request Examples -->\n\nCODE_BLOCK_14\n<!-- end -->\n\n<!-- example bigram -->\nThere is a nice trick how you can improve the above algorithm - use [bigram_index](../Creating_a_table/NLP_and_tokenization/Low-level_tokenization.md#bigram_index). When you have it enabled for the table what you get in it is not just a single word, but each pair of words standing one after another indexed as a separate token.\n\nThis allows to predict not just the current word's ending, but the next word too which is especially beneficial for the purpose of autocomplete.\n\n<!-- intro -->\n##### Examples:\n\n<!-- request Examples -->\n\nCODE_BLOCK_15\n<!-- end -->\n\n`CALL KEYWORDS` supports distributed tables so no matter how big your data set you can benefit from using it.\n<!-- proofread -->\n\n",
  4. "translations": {
  5. "chinese": "\u6709\u4e00\u7bc7\u5173\u4e8e\u5b83\u7684[\u535a\u5ba2\u6587\u7ae0](https://manticoresearch.com/blog/simple-autocomplete-with-manticore/)\u4ee5\u53ca\u4e00\u4e2a[\u4ea4\u4e92\u5f0f\u8bfe\u7a0b](https://play.manticoresearch.com/simpleautocomplete/)\u3002\u4e00\u4e2a\u5feb\u901f\u793a\u4f8b\u5982\u4e0b\uff1a\n* \u5047\u8bbe\u4f60\u6709\u8fd9\u6837\u4e00\u6bb5\u6587\u6863\uff1a`My cat loves my dog. The cat (Felis catus) is a domestic species of small carnivorous mammal.`\n* \u7136\u540e\u4f60\u53ef\u4ee5\u4f7f\u7528 `^`\u3001`\"\"` \u548c `*`\uff0c\u8fd9\u6837\u5f53\u7528\u6237\u8f93\u5165\u65f6\uff0c\u4f60\u53ef\u4ee5\u53d1\u51fa\u7c7b\u4f3c `^\"m*\"`\u3001`^\"my *\"`\u3001`^\"my c*\"`\u3001`^\"my ca*\"` \u7b49\u67e5\u8be2\n* \u5b83\u5c06\u627e\u5230\u8be5\u6587\u6863\uff0c\u5982\u679c\u4f60\u8fd8\u505a\u4e86[\u9ad8\u4eae](../Searching/Highlighting.md)\uff0c\u4f60\u5c06\u5f97\u5230\u7c7b\u4f3c\uff1a`<b>My cat</b> loves my dog. The cat ( ...`\n\n##### \u81ea\u52a8\u8865\u5168\u5355\u8bcd\n\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f60\u53ea\u9700\u8981\u81ea\u52a8\u8865\u5168\u4e00\u4e2a\u5355\u8bcd\u6216\u51e0\u4e2a\u5355\u8bcd\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528 `CALL KEYWORDS`\u3002\n\n### CALL KEYWORDS\n`CALL KEYWORDS` \u53ef\u901a\u8fc7 SQL \u63a5\u53e3\u4f7f\u7528\uff0c\u63d0\u4f9b\u4e86\u4e00\u79cd\u68c0\u67e5\u5173\u952e\u5b57\u5982\u4f55\u88ab\u5206\u8bcd\uff0c\u6216\u83b7\u53d6\u7279\u5b9a\u5173\u952e\u5b57\u7684\u5206\u8bcd\u5f62\u5f0f\u7684\u65b9\u6cd5\u3002\u5982\u679c\u8868\u542f\u7528\u4e86[\u4e2d\u7f00](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#min_infix_len)\uff0c\u5b83\u53ef\u4ee5\u5feb\u901f\u627e\u5230\u7ed9\u5b9a\u5173\u952e\u5b57\u7684\u53ef\u80fd\u7ed3\u5c3e\uff0c\u9002\u5408\u7528\u4e8e\u81ea\u52a8\u8865\u5168\u529f\u80fd\u3002\n\n\u8fd9\u6bd4\u901a\u7528\u7684\u4e2d\u7f00\u641c\u7d22\u662f\u4e00\u79cd\u5f88\u597d\u7684\u66ff\u4ee3\u65b9\u6848\uff0c\u56e0\u4e3a\u5b83\u6027\u80fd\u66f4\u9ad8\uff0c\u53ea\u9700\u4f7f\u7528\u8868\u7684\u5b57\u5178\uff0c\u800c\u4e0d\u9700\u8981\u6587\u6863\u672c\u8eab\u3002\n\n### \u901a\u7528\u8bed\u6cd5\n<!-- example keywords -->\nCODE_BLOCK_13\n`CALL KEYWORDS` \u8bed\u53e5\u5c06\u6587\u672c\u5212\u5206\u4e3a\u5173\u952e\u5b57\u3002\u5b83\u8fd4\u56de\u5173\u952e\u5b57\u7684\u5206\u8bcd\u548c\u89c4\u8303\u5316\u5f62\u5f0f\uff0c\u5982\u679c\u9700\u8981\uff0c\u8fd8\u53ef\u4ee5\u8fd4\u56de\u5173\u952e\u5b57\u7edf\u8ba1\u4fe1\u606f\u3002\u6b64\u5916\uff0c\u5f53\u8868\u542f\u7528\u4e86[\u8bcd\u5f62\u8fd8\u539f\u5668](../Creating_a_table/NLP_and_tokenization/Morphology.md)\u65f6\uff0c\u8fd8\u4f1a\u63d0\u4f9b\u67e5\u8be2\u4e2d\u6bcf\u4e2a\u5173\u952e\u5b57\u7684\u4f4d\u7f6e\u53ca\u6240\u6709\u5206\u8bcd\u5f62\u5f0f\u3002\n\n| \u53c2\u6570 | \u8bf4\u660e |\n| - | - |\n| text | \u9700\u8981\u62c6\u5206\u7684\u6587\u672c |\n| table | \u7528\u4ee5\u83b7\u53d6\u6587\u672c\u5904\u7406\u8bbe\u7f6e\u7684\u8868\u540d\u79f0 |\n| 0/1 as stats | \u662f\u5426\u663e\u793a\u5173\u952e\u5b57\u7edf\u8ba1\uff0c\u9ed8\u8ba4\u662f 0 |\n| 0/1 as fold_wildcards | \u662f\u5426\u6298\u53e0\u901a\u914d\u7b26\uff0c\u9ed8\u8ba4\u662f 0 |\n| 0/1 as fold_lemmas | \u662f\u5426\u6298\u53e0\u5f62\u6001\u8bcd\u5f62\uff0c\u9ed8\u8ba4\u662f 0 |\n| 0/1 as fold_blended | \u662f\u5426\u6298\u53e0\u6df7\u5408\u8bcd\uff0c\u9ed8\u8ba4\u662f 0 |\n| N as expansion_limit | \u8986\u76d6\u670d\u52a1\u5668\u914d\u7f6e\u4e2d\u5b9a\u4e49\u7684[expansion_limit](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#expansion_limit)\uff0c\u9ed8\u8ba4\u662f 0\uff08\u4f7f\u7528\u914d\u7f6e\u503c\uff09 |\n| docs/hits as sort_mode | \u6309 \u2018docs\u2019 \u6216 \u2018hits\u2019 \u6392\u5e8f\u8f93\u51fa\u7ed3\u679c\uff0c\u9ed8\u8ba4\u4e0d\u6392\u5e8f |\n| jieba_mode | \u67e5\u8be2\u7684\u7ed3\u5df4\u5206\u8bcd\u6a21\u5f0f\uff0c\u8be6\u89c1[jieba_mode](../Creating_a_table/NLP_and_tokenization/Morphology.md#jieba_mode) |\n\n\u4ee5\u4e0b\u793a\u4f8b\u5c55\u793a\u4e86\u5f53\u7528\u6237\u5c1d\u8bd5\u83b7\u53d6\u201cmy cat ...\u201d\u7684\u81ea\u52a8\u8865\u5168\u65f6\u5b83\u662f\u5982\u4f55\u5de5\u4f5c\u7684\u3002\u56e0\u6b64\uff0c\u5728\u5e94\u7528\u7aef\u4f60\u53ea\u9700\u9488\u5bf9\u6bcf\u4e2a\u65b0\u8bcd\u5efa\u8bae\u201cnormalized\u201d\u5217\u4e2d\u7684\u7ed3\u5c3e\u3002\u901a\u5e38\u4f7f\u7528 `'hits' as sort_mode` \u6216 `'docs' as sort_mode` \u6765\u6392\u5e8f\u4f1a\u66f4\u5408\u7406\u3002\n\n<!-- intro -->\n##### \u793a\u4f8b\uff1a\n\n<!-- request Examples -->\n\nCODE_BLOCK_14\n<!-- end -->\n\n<!-- example bigram -->\n\u8fd9\u91cc\u6709\u4e00\u4e2a\u5f88\u597d\u7684\u6280\u5de7\u53ef\u4ee5\u6539\u8fdb\u4e0a\u8ff0\u7b97\u6cd5\u2014\u2014\u4f7f\u7528[bigram_index](../Creating_a_table/NLP_and_tokenization/Low-level_tokenization.md#bigram_index)\u3002\u5f53\u4f60\u4e3a\u8868\u542f\u7528\u5b83\u65f6\uff0c\u7d22\u5f15\u4e2d\u4e0d\u4ec5\u5305\u542b\u5355\u4e2a\u8bcd\uff0c\u8fd8\u5305\u542b\u6bcf\u5bf9\u76f8\u90bb\u8bcd\u4f5c\u4e3a\u72ec\u7acb\u7684\u8bcd\u6761\u3002\n\n\u8fd9\u4e0d\u4ec5\u80fd\u9884\u6d4b\u5f53\u524d\u5355\u8bcd\u7684\u7ed3\u5c3e\uff0c\u8fd8\u80fd\u9884\u6d4b\u4e0b\u4e00\u4e2a\u5355\u8bcd\uff0c\u5bf9\u81ea\u52a8\u8865\u5168\u76ee\u6807\u7279\u522b\u6709\u76ca\u3002\n\n<!-- intro -->\n##### \u793a\u4f8b\uff1a\n\n<!-- request Examples -->\n\nCODE_BLOCK_15\n<!-- end -->\n\n`CALL KEYWORDS` \u652f\u6301\u5206\u5e03\u5f0f\u8868\uff0c\u65e0\u8bba\u4f60\u7684\u6570\u636e\u96c6\u591a\u5927\uff0c\u90fd\u80fd\u5229\u7528\u5b83\u7684\u4f18\u52bf\u3002 \n<!-- proofread -->",
  6. "russian": "\u0412 \u043d\u0430\u0448\u0435\u043c [\u0431\u043b\u043e\u0433\u0435 \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u0431 \u044d\u0442\u043e\u043c](https://manticoresearch.com/blog/simple-autocomplete-with-manticore/) \u0438 [\u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u0443\u0440\u0441](https://play.manticoresearch.com/simpleautocomplete/). \u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:\n* \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442: `\u041c\u043e\u0439 \u043a\u043e\u0442 \u043b\u044e\u0431\u0438\u0442 \u043c\u043e\u044e \u0441\u043e\u0431\u0430\u043a\u0443. \u041a\u043e\u0442 (Felis catus) - \u044d\u0442\u043e \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043f\u043b\u043e\u0442\u043e\u044f\u0434\u043d\u043e\u0433\u043e \u043c\u043b\u0435\u043a\u043e\u043f\u0438\u0442\u0430\u044e\u0449\u0435\u0433\u043e.`\n* \u0422\u043e\u0433\u0434\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c `^`, `\"\"` \u0438 `*`, \u0442\u0430\u043a \u0447\u0442\u043e, \u043f\u043e\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442, \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a: `^\"\u043c*\"`, `^\"\u043c\u043e\u0439 *\"`, `^\"\u043c\u043e\u0439 \u043a*\"`, `^\"\u043c\u043e\u0439 \u043a\u043e*\"` \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435\n* \u042d\u0442\u043e \u043d\u0430\u0439\u0434\u0435\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u0438 \u0435\u0441\u043b\u0438 \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435 [\u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435](../Searching/Highlighting.md), \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435: `<b>\u041c\u043e\u0439 \u043a\u043e\u0442</b> \u043b\u044e\u0431\u0438\u0442 \u043c\u043e\u044e \u0441\u043e\u0431\u0430\u043a\u0443. \u041a\u043e\u0442 ( ...`\n\n##### \u0410\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430\n\u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0432\u0441\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u044d\u0442\u043e \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0434\u043d\u043e \u0441\u043b\u043e\u0432\u043e \u0438\u043b\u0438 \u043f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c `CALL KEYWORDS`.\n\n### CALL KEYWORDS\n`CALL KEYWORDS` \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0447\u0435\u0440\u0435\u0437 SQL \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0437\u0443\u0447\u0438\u0442\u044c, \u043a\u0430\u043a \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432. \u0415\u0441\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 [\u0438\u043d\u0444\u0438\u043a\u0441\u044b](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#min_infix_len), \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.\n\n\u042d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u043e\u0431\u0449\u0435\u043c\u0443 \u0438\u043d\u0444\u0438\u043a\u0441\u043d\u043e\u043c\u0443 \u043f\u043e\u0438\u0441\u043a\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0435\u0439 \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0430 \u043d\u0435 \u0441\u0430\u043c\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b.\n\n### \u041e\u0431\u0449\u0438\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\n<!-- example keywords -->\nCODE_BLOCK_13\n\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 `CALL KEYWORDS` \u0434\u0435\u043b\u0438\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430. \u041e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043e\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0438 \u0432\u0441\u0435 \u0444\u043e\u0440\u043c\u044b \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432, \u043a\u043e\u0433\u0434\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 [\u043b\u0435\u043c\u043c\u0430\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u044b](../Creating_a_table/NLP_and_tokenization/Morphology.md).\n\n| \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 | \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 |\n| - | - |\n| text | \u0422\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u0438\u0432\u043a\u0438 \u043d\u0430 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 |\n| table | \u0418\u043c\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 |\n| 0/1 \u043a\u0430\u043a stats | \u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 0 |\n| 0/1 \u043a\u0430\u043a fold_wildcards | \u0421\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 0 |\n| 0/1 \u043a\u0430\u043a fold_lemmas | \u0421\u043b\u043e\u0436\u0438\u0442\u044c \u043c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043b\u0435\u043c\u043c\u044b, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 0 |\n| 0/1 \u043a\u0430\u043a fold_blended | \u0421\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u043c\u0435\u0448\u0430\u043d\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 0 |\n| N \u043a\u0430\u043a expansion_limit | \u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c [expansion_limit](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#expansion_limit), \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 0 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438) |\n| docs/hits \u043a\u0430\u043a sort_mode | \u0421\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e 'docs' \u0438\u043b\u0438 'hits'. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. |\n| jieba_mode | \u0420\u0435\u0436\u0438\u043c \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Jieba \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0421\u043c. [jieba_mode](../Creating_a_table/NLP_and_tokenization/Morphology.md#jieba_mode) \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u0439 |\n\n\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \"\u043c\u043e\u0439 \u043a\u043e\u0442 ...\". \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0441\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0438\u0437 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \"\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439\" \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430. \u0427\u0430\u0441\u0442\u043e \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e hits \u0438\u043b\u0438 docs, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f `'hits' \u043a\u0430\u043a sort_mode` \u0438\u043b\u0438 `'docs' \u043a\u0430\u043a sort_mode`.\n\n<!-- intro -->\n##### \u041f\u0440\u0438\u043c\u0435\u0440\u044b:\n\n<!-- request Examples -->\n\nCODE_BLOCK_14\n<!-- end -->\n\n<!-- example bigram -->\n\u0415\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0442\u0440\u044e\u043a, \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c - \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 [bigram_index](../Creating_a_table/NLP_and_tokenization/Low-level_tokenization.md#bigram_index). \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0435 \u0435\u0433\u043e \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0434\u043d\u043e \u0441\u043b\u043e\u0432\u043e, \u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u043f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432, \u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u0434\u0440\u0443\u0433 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u043c, \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u043c\u0443\u044e \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d.\n\n\u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430, \u043d\u043e \u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043b\u043e\u0432\u043e, \u0447\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.\n\n<!-- intro -->\n##### \u041f\u0440\u0438\u043c\u0435\u0440\u044b:\n\n<!-- request Examples -->\n\nCODE_BLOCK_15\n<!-- end -->\n\n`CALL KEYWORDS` \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u043b\u0438\u043a \u0432\u0430\u0448 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0432\u044b\u0433\u043e\u0434\u0443 \u043e\u0442 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.\n<!-- proofread -->"
  7. },
  8. "is_code_or_comment": false,
  9. "model": "openai:gpt-4o-mini",
  10. "updated_at": 1766339827
  11. },
  12. "afd116b94c723950729d94807a1ee90650d5c3e55e98c28769258dd719f72194": {
  13. "original": "# Autocomplete\n\nAutocomplete, or word completion, predicts and suggests the end of a word or phrase as you type. It's commonly used in:\n- Search boxes on websites\n- Suggestions in search engines\n- Text fields in apps\n\nManticore offers an advanced autocomplete feature that gives suggestions while you type, similar to those in well-known search engines. This helps speed up searches and lets users find what they need faster.\n\nIn addition to basic autocomplete functionality, Manticore includes advanced features to enhance the user experience:\n\n1. **Spell Correction (Fuzziness):** Manticore's autocomplete helps correct spelling mistakes by using algorithms that recognize and fix common errors. This means even if you type something wrong, you can still find what you were looking for.\n2. **Keyboard Layout Autodetection:** Manticore can figure out which keyboard layout you are using. This is really useful in places where many languages are used, or if you accidentally type in the wrong language. For example, if you type \"ghbdtn\" by mistake, Manticore knows you meant to say \"\u043f\u0440\u0438\u0432\u0435\u0442\" (hello in Russian) and suggests the correct word.\n\nManticore's autocomplete can be tailored to match different needs and settings, making it a flexible tool for many applications.\n\n![Autocomplete](autocomplete.png)\n\n## CALL AUTOCOMPLETE\n\n> NOTE: `CALL AUTOCOMPLETE` and `/autocomplete` require [Manticore Buddy](../Installation/Manticore_Buddy.md). If it doesn't work, make sure Buddy is installed.\n\n<!-- example call_autocomplete -->\nTo use autocomplete in Manticore, use the `CALL AUTOCOMPLETE` SQL statement or its JSON equivalent `/autocomplete`. This feature provides word completion suggestions based on your indexed data.\n\nBefore you proceed, ensure that the table you intend to use for autocomplete has [infixes](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#min_infix_len) enabled.\n\n**Note:** There's an automatic check for `min_infix_len` in the table settings, which uses a 30-second cache to improve the performance of `CALL AUTOCOMPLETE`. After making changes to your table, there may be a brief delay the first time you use `CALL AUTOCOMPLETE` (though this is usually not noticeable). Only successful results are cached, so if you remove the table or disable `min_infix_len`, `CALL AUTOCOMPLETE` may temporarily return incorrect results until it eventually starts showing an error related to `min_infix_len`.\n\n### General syntax\n\n#### SQL\nCODE_BLOCK_0\n\n#### JSON\nCODE_BLOCK_1\n\n#### Options\n- `layouts`: A comma-separated string of keyboard layout codes for detecting typing errors caused by keyboard layout mismatches (e.g., typing \"ghbdtn\" instead of \"\u043f\u0440\u0438\u0432\u0435\u0442\" when using wrong layout). Manticore compares character positions across different layouts to suggest corrections. Requires at least 2 layouts to effectively detect mismatches. Available options: us, ru, ua, se, pt, no, it, gr, uk, fr, es, dk, de, ch, br, bg, be (more details [here](../Searching/Spell_correction.md#Options)). Default: none\n- `fuzziness`: `0`, `1`, or `2` (default: `2`). Maximum Levenshtein distance for finding typos. Set to `0` to disable fuzzy matching\n- `preserve`: `0` or `1` (default: `0`). When set to `1`, keeps words that don't have fuzzy matches in the search results (e.g., \"hello wrld\" returns both \"hello wrld\" and \"hello world\"). When set to `0`, only returns words with successful fuzzy matches (e.g., \"hello wrld\" returns only \"hello world\"). Particularly useful for preserving short words or proper nouns that may not exist in Manticore Search\n- `prepend`: Boolean (0/1 in SQL). If true(1), adds an asterisk before the last word for prefix expansion (e.g., `*word`)\n- `append`: Boolean (0/1 in SQL). If true(1), adds an asterisk after the last word for suffix expansion (e.g., `word*`)\n- `expansion_len`: Number of characters to expand in the last word. Default: `10`\n- `force_bigrams`: Boolean (0/1 in SQL). Forces the use of bigrams (2-character n-grams) instead of trigrams for all word lengths, which can improve matching for words with transposition errors. Default: `0` (use trigrams for words \u22656 characters)\n\n<!-- request SQL -->\n\nCODE_BLOCK_2\n\n<!-- request SQL with no fuzzy search -->\n\nCODE_BLOCK_3\n\n<!-- request JSON -->\n\nCODE_BLOCK_4\n\n<!-- response JSON -->\nCODE_BLOCK_5\n\n<!-- request SQL with preserve option -->\n\nCODE_BLOCK_6\n\n<!-- request JSON with preserve option -->\n\nCODE_BLOCK_7\n\n<!-- response JSON with preserve option -->\nCODE_BLOCK_8\n\n<!-- end -->\n\n<!-- example force_bigrams option -->\n##### Using force_bigrams for better transposition handling\nThe `force_bigrams` option can help with words that have transposition errors, such as \"ipohne\" vs \"iphone\". By using bigrams instead of trigrams, the algorithm can better handle character transpositions.\n\n<!-- request SQL -->\nCODE_BLOCK_9\n\n<!-- response SQL -->\nCODE_BLOCK_10\n\n<!-- request JSON -->\nCODE_BLOCK_11\n\n<!-- response JSON -->\nCODE_BLOCK_12\n\n<!-- end -->\n\n#### Links\n* [This demo](https://github.manticoresearch.com/manticoresoftware/manticoresearch) demonstrates the autocomplete functionality:\n ![Autocomplete example](autocomplete_github_demo.png){.scale-0.7}\n* Blog post about Fuzzy Search and Autocomplete - https://manticoresearch.com/blog/new-fuzzy-search-and-autocomplete/\n\n## Alternative autocomplete methods\n\nWhile `CALL AUTOCOMPLETE` is the recommended method for most use cases, Manticore also supports other controllable and customizable approaches to implement autocomplete functionality:\n\n##### Autocomplete a sentence\nTo autocomplete a sentence, you can use [infixed search](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#min_infix_len). You can find the end of a document field by providing its beginning and:\n* using the [full-text wildcard operator](../Searching/Full_text_matching/Operators.md) `*` to match any characters\n* optionally using `^` to start from the beginning of the field\n* optionally using `\"\"` for phrase matching\n* and using [result highlighting](../Searching/Highlighting.md)",
  14. "translations": {
  15. "chinese": "# \u81ea\u52a8\u8865\u5168\n\n\u81ea\u52a8\u8865\u5168\uff0c\u6216\u79f0\u4e3a\u5355\u8bcd\u8865\u5168\uff0c\u662f\u5728\u4f60\u8f93\u5165\u65f6\u9884\u6d4b\u5e76\u5efa\u8bae\u5355\u8bcd\u6216\u77ed\u8bed\u7684\u7ed3\u5c3e\u3002\u5b83\u901a\u5e38\u7528\u4e8e\uff1a\n- \u7f51\u7ad9\u4e0a\u7684\u641c\u7d22\u6846\n- \u641c\u7d22\u5f15\u64ce\u4e2d\u7684\u5efa\u8bae\n- \u5e94\u7528\u7a0b\u5e8f\u4e2d\u7684\u6587\u672c\u5b57\u6bb5\n\nManticore \u63d0\u4f9b\u4e86\u4e00\u4e2a\u9ad8\u7ea7\u81ea\u52a8\u8865\u5168\u529f\u80fd\uff0c\u80fd\u591f\u5728\u8f93\u5165\u65f6\u5373\u65f6\u7ed9\u51fa\u5efa\u8bae\uff0c\u7c7b\u4f3c\u4e8e\u77e5\u540d\u641c\u7d22\u5f15\u64ce\u7684\u529f\u80fd\u3002\u8fd9\u6709\u52a9\u4e8e\u52a0\u5feb\u641c\u7d22\u901f\u5ea6\uff0c\u8ba9\u7528\u6237\u66f4\u5feb\u627e\u5230\u6240\u9700\u5185\u5bb9\u3002\n\n\u9664\u4e86\u57fa\u672c\u7684\u81ea\u52a8\u8865\u5168\u529f\u80fd\u5916\uff0cManticore \u8fd8\u5305\u542b\u9ad8\u7ea7\u529f\u80fd\uff0c\u4ee5\u63d0\u5347\u7528\u6237\u4f53\u9a8c\uff1a\n\n1. **\u62fc\u5199\u7ea0\u6b63\uff08\u6a21\u7cca\u5339\u914d\uff09\uff1a** Manticore \u7684\u81ea\u52a8\u8865\u5168\u901a\u8fc7\u4f7f\u7528\u8bc6\u522b\u5e76\u4fee\u6b63\u5e38\u89c1\u9519\u8bef\u7684\u7b97\u6cd5\uff0c\u5e2e\u52a9\u7ea0\u6b63\u62fc\u5199\u9519\u8bef\u3002\u8fd9\u610f\u5473\u7740\u5373\u4f7f\u4f60\u8f93\u5165\u9519\u8bef\uff0c\u4ecd\u7136\u53ef\u4ee5\u627e\u5230\u4f60\u60f3\u627e\u7684\u5185\u5bb9\u3002\n2. **\u952e\u76d8\u5e03\u5c40\u81ea\u52a8\u68c0\u6d4b\uff1a** Manticore \u80fd\u81ea\u52a8\u8bc6\u522b\u4f60\u4f7f\u7528\u7684\u952e\u76d8\u5e03\u5c40\u3002\u8fd9\u5728\u591a\u8bed\u8a00\u73af\u5883\u4e2d\u6216\u4f60\u610f\u5916\u4f7f\u7528\u4e86\u9519\u8bef\u8bed\u8a00\u65f6\u975e\u5e38\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u8bef\u8f93\u201cghbdtn\u201d\uff0cManticore \u4f1a\u77e5\u9053\u4f60\u662f\u60f3\u8f93\u5165\u4fc4\u8bed\u7684\u201c\u043f\u0440\u0438\u0432\u0435\u0442\u201d\uff08\u4f60\u597d\uff09\uff0c\u5e76\u5efa\u8bae\u6b63\u786e\u7684\u5355\u8bcd\u3002\n\nManticore \u7684\u81ea\u52a8\u8865\u5168\u53ef\u4ee5\u6839\u636e\u4e0d\u540c\u9700\u6c42\u548c\u8bbe\u7f6e\u5b9a\u5236\uff0c\u6210\u4e3a\u591a\u79cd\u5e94\u7528\u7684\u7075\u6d3b\u5de5\u5177\u3002\n\n![Autocomplete](autocomplete.png)\n\n## \u8c03\u7528\u81ea\u52a8\u8865\u5168\uff08CALL AUTOCOMPLETE\uff09\n\n> \u6ce8\u610f\uff1a`CALL AUTOCOMPLETE` \u548c `/autocomplete` \u9700\u8981\u5b89\u88c5 [Manticore Buddy](../Installation/Manticore_Buddy.md)\u3002\u5982\u679c\u65e0\u6cd5\u4f7f\u7528\uff0c\u8bf7\u786e\u8ba4 Buddy \u5df2\u5b89\u88c5\u3002\n\n<!-- example call_autocomplete -->\n\u5728 Manticore \u4e2d\u4f7f\u7528\u81ea\u52a8\u8865\u5168\uff0c\u8bf7\u4f7f\u7528 `CALL AUTOCOMPLETE` SQL \u8bed\u53e5\u6216\u5176 JSON \u7b49\u4ef7 `/autocomplete`\u3002\u8be5\u529f\u80fd\u57fa\u4e8e\u4f60\u7684\u7d22\u5f15\u6570\u636e\u63d0\u4f9b\u5355\u8bcd\u8865\u5168\u5efa\u8bae\u3002\n\n\u5728\u7ee7\u7eed\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u4f60\u6253\u7b97\u7528\u4e8e\u81ea\u52a8\u8865\u5168\u7684\u8868\u5df2\u7ecf\u5f00\u542f\u4e86 [infixes](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#min_infix_len)\u3002\n\n**\u6ce8\u610f\uff1a** \u8868\u8bbe\u7f6e\u4e2d\u81ea\u52a8\u68c0\u67e5 `min_infix_len`\uff0c\u5e76\u4f7f\u752830\u79d2\u7f13\u5b58\u4ee5\u63d0\u9ad8 `CALL AUTOCOMPLETE` \u7684\u6027\u80fd\u3002\u4fee\u6539\u8868\u540e\uff0c\u9996\u6b21\u8c03\u7528 `CALL AUTOCOMPLETE` \u53ef\u80fd\u4f1a\u6709\u77ed\u6682\u5ef6\u8fdf\uff08\u901a\u5e38\u4e0d\u660e\u663e\uff09\u3002\u4ec5\u7f13\u5b58\u6210\u529f\u7ed3\u679c\uff0c\u6240\u4ee5\u5982\u679c\u4f60\u5220\u9664\u8868\u6216\u7981\u7528 `min_infix_len`\uff0c`CALL AUTOCOMPLETE` \u53ef\u80fd\u6682\u65f6\u8fd4\u56de\u9519\u8bef\u7ed3\u679c\uff0c\u76f4\u5230\u6700\u7ec8\u663e\u793a\u4e0e `min_infix_len` \u76f8\u5173\u7684\u9519\u8bef\u3002\n\n### \u901a\u7528\u8bed\u6cd5\n\n#### SQL\nCODE_BLOCK_0\n\n#### JSON\nCODE_BLOCK_1\n\n#### \u9009\u9879\n- `layouts`\uff1a\u9017\u53f7\u5206\u9694\u7684\u952e\u76d8\u5e03\u5c40\u4ee3\u7801\u5b57\u7b26\u4e32\uff0c\u7528\u4e8e\u68c0\u6d4b\u7531\u952e\u76d8\u5e03\u5c40\u4e0d\u5339\u914d\u5bfc\u81f4\u7684\u8f93\u5165\u9519\u8bef\uff08\u4f8b\u5982\u9519\u8bef\u5e03\u5c40\u4e0b\u8f93\u5165\u201cghbdtn\u201d\u800c\u975e\u201c\u043f\u0440\u0438\u0432\u0435\u0442\u201d\uff09\u3002Manticore \u4f1a\u6bd4\u8f83\u4e0d\u540c\u5e03\u5c40\u7684\u5b57\u7b26\u4f4d\u7f6e\u4ee5\u5efa\u8bae\u66f4\u6b63\u3002\u8981\u6c42\u81f3\u5c11\u4e24\u4e2a\u5e03\u5c40\u624d\u80fd\u6709\u6548\u68c0\u6d4b\u4e0d\u5339\u914d\u3002\u53ef\u7528\u5e03\u5c40\u9009\u9879\uff1aus, ru, ua, se, pt, no, it, gr, uk, fr, es, dk, de, ch, br, bg, be\uff08\u8be6\u7ec6\u8bf4\u660e\u89c1 [\u8fd9\u91cc](../Searching/Spell_correction.md#Options)\uff09\u3002\u9ed8\u8ba4\u503c\uff1a\u65e0\n- `fuzziness`\uff1a`0`\uff0c`1`\uff0c\u6216`2`\uff08\u9ed8\u8ba4\uff1a`2`\uff09\u3002\u7528\u4e8e\u67e5\u627e\u62fc\u5199\u9519\u8bef\u7684\u6700\u5927 Levenshtein \u8ddd\u79bb\u3002\u8bbe\u7f6e\u4e3a `0` \u53ef\u7981\u7528\u6a21\u7cca\u5339\u914d\n- `preserve`\uff1a`0` \u6216 `1`\uff08\u9ed8\u8ba4\uff1a`0`\uff09\u3002\u8bbe\u7f6e\u4e3a `1` \u65f6\uff0c\u4fdd\u7559\u641c\u7d22\u7ed3\u679c\u4e2d\u65e0\u6a21\u7cca\u5339\u914d\u7684\u5355\u8bcd\uff08\u4f8b\u5982\uff0c\u201chello wrld\u201d \u8fd4\u56de\u201chello wrld\u201d\u548c\u201chello world\u201d\uff09\u3002\u8bbe\u7f6e\u4e3a `0` \u65f6\uff0c\u53ea\u8fd4\u56de\u6709\u6210\u529f\u6a21\u7cca\u5339\u914d\u7684\u5355\u8bcd\uff08\u4f8b\u5982\uff0c\u201chello wrld\u201d \u4ec5\u8fd4\u56de\u201chello world\u201d\uff09\u3002\u7279\u522b\u9002\u7528\u4e8e\u4fdd\u7559\u77ed\u5355\u8bcd\u6216\u53ef\u80fd\u4e0d\u5b58\u5728\u4e8e Manticore Search \u7684\u4e13\u6709\u540d\u8bcd\n- `prepend`\uff1a\u5e03\u5c14\u503c\uff08SQL\u4e2d\u4e3a0/1\uff09\u3002\u5982\u679c\u4e3a\u771f(1)\uff0c\u5219\u5728\u6700\u540e\u4e00\u4e2a\u5355\u8bcd\u524d\u6dfb\u52a0\u661f\u53f7\u4ee5\u8fdb\u884c\u524d\u7f00\u6269\u5c55\uff08\u4f8b\u5982 `*word`\uff09\n- `append`\uff1a\u5e03\u5c14\u503c\uff08SQL\u4e2d\u4e3a0/1\uff09\u3002\u5982\u679c\u4e3a\u771f(1)\uff0c\u5219\u5728\u6700\u540e\u4e00\u4e2a\u5355\u8bcd\u540e\u6dfb\u52a0\u661f\u53f7\u4ee5\u8fdb\u884c\u540e\u7f00\u6269\u5c55\uff08\u4f8b\u5982 `word*`\uff09\n- `expansion_len`\uff1a\u6269\u5c55\u6700\u540e\u4e00\u4e2a\u5355\u8bcd\u7684\u5b57\u7b26\u6570\u3002\u9ed8\u8ba4\u503c\uff1a`10`\n- `force_bigrams`\uff1a\u5e03\u5c14\u503c\uff08SQL\u4e2d0/1\uff09\u3002\u5f3a\u5236\u5bf9\u6240\u6709\u5355\u8bcd\u957f\u5ea6\u4f7f\u7528\u4e8c\u5143\u7ec4\uff082\u5b57\u7b26 n-gram\uff09\u800c\u975e\u4e09\u5143\u7ec4\uff0c\u4ee5\u6539\u5584\u9488\u5bf9\u5b57\u7b26\u8f6c\u7f6e\u9519\u8bef\u7684\u5339\u914d\u3002\u9ed8\u8ba4\u503c\uff1a`0`\uff08\u5355\u8bcd\u957f\u5ea6\u22656\u65f6\u4f7f\u7528\u4e09\u5143\u7ec4\uff09\n\n<!-- request SQL -->\n\nCODE_BLOCK_2\n\n<!-- request SQL with no fuzzy search -->\n\nCODE_BLOCK_3\n\n<!-- request JSON -->\n\nCODE_BLOCK_4\n\n<!-- response JSON -->\nCODE_BLOCK_5\n\n<!-- request SQL with preserve option -->\n\nCODE_BLOCK_6\n\n<!-- request JSON with preserve option -->\n\nCODE_BLOCK_7\n\n<!-- response JSON with preserve option -->\nCODE_BLOCK_8\n\n<!-- end -->\n\n<!-- example force_bigrams option -->\n##### \u4f7f\u7528 force_bigrams \u66f4\u597d\u5730\u5904\u7406\u5b57\u7b26\u8f6c\u7f6e\u9519\u8bef\n`force_bigrams` \u9009\u9879\u6709\u52a9\u4e8e\u5904\u7406\u5b57\u7b26\u8f6c\u7f6e\u9519\u8bef\u7684\u5355\u8bcd\uff0c\u4f8b\u5982\u201cipohne\u201d\u4e0e\u201ciphone\u201d\u3002\u901a\u8fc7\u4f7f\u7528\u4e8c\u5143\u7ec4\u800c\u975e\u4e09\u5143\u7ec4\uff0c\u7b97\u6cd5\u80fd\u591f\u66f4\u597d\u5730\u5904\u7406\u5b57\u7b26\u4f4d\u7f6e\u98a0\u5012\u7684\u95ee\u9898\u3002\n\n<!-- request SQL -->\nCODE_BLOCK_9\n\n<!-- response SQL -->\nCODE_BLOCK_10\n\n<!-- request JSON -->\nCODE_BLOCK_11\n\n<!-- response JSON -->\nCODE_BLOCK_12\n\n<!-- end -->\n\n#### \u94fe\u63a5\n* [\u6b64\u6f14\u793a](https://github.manticoresearch.com/manticoresoftware/manticoresearch) \u6f14\u793a\u4e86\u81ea\u52a8\u8865\u5168\u529f\u80fd\uff1a\n ![Autocomplete example](autocomplete_github_demo.png){.scale-0.7}\n* \u5173\u4e8e\u6a21\u7cca\u641c\u7d22\u548c\u81ea\u52a8\u8865\u5168\u7684\u535a\u5ba2\u6587\u7ae0 - https://manticoresearch.com/blog/new-fuzzy-search-and-autocomplete/\n\n## \u66ff\u4ee3\u81ea\u52a8\u8865\u5168\u65b9\u6cd5\n\n\u5c3d\u7ba1 `CALL AUTOCOMPLETE` \u662f\u5927\u591a\u6570\u4f7f\u7528\u573a\u666f\u63a8\u8350\u7684\u65b9\u6cd5\uff0cManticore \u4e5f\u652f\u6301\u5176\u4ed6\u53ef\u63a7\u4e14\u53ef\u81ea\u5b9a\u4e49\u7684\u65b9\u6cd5\u6765\u5b9e\u73b0\u81ea\u52a8\u8865\u5168\u529f\u80fd\uff1a\n\n##### \u8865\u5168\u53e5\u5b50\n\u8981\u8865\u5168\u4e00\u53e5\u8bdd\uff0c\u53ef\u4ee5\u4f7f\u7528 [infix \u641c\u7d22](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#min_infix_len)\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u7ed9\u51fa\u6587\u6863\u5b57\u6bb5\u7684\u5f00\u5934\u5e76\uff1a\n* \u4f7f\u7528[\u5168\u6587\u901a\u914d\u7b26\u64cd\u4f5c\u7b26](../Searching/Full_text_matching/Operators.md) `*` \u6765\u5339\u914d\u4efb\u610f\u5b57\u7b26\n* \u53ef\u9009\u5730\u4f7f\u7528 `^` \u4ece\u5b57\u6bb5\u5f00\u5934\u5f00\u59cb\u5339\u914d\n* \u53ef\u9009\u5730\u4f7f\u7528 `\"\"` \u8fdb\u884c\u77ed\u8bed\u5339\u914d\n* \u5e76\u4f7f\u7528[\u7ed3\u679c\u9ad8\u4eae](../Searching/Highlighting.md)",
  16. "russian": "# \u0410\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\n\n\u0410\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0438\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0432, \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430 \u0438\u043b\u0438 \u0444\u0440\u0430\u0437\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u0435\u043a\u0441\u0442\u0430. \u0415\u0433\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432:\n- \u041f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u043d\u0430 \u0441\u0430\u0439\u0442\u0430\u0445\n- \u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430\u0445 \u0432 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445\n- \u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u044f\u0445 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445\n\nManticore \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u0432\u043e\u0434\u0430, \u043f\u043e\u0434\u043e\u0431\u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0435.\n\n\u041a\u0440\u043e\u043c\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, Manticore \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430:\n\n1. **\u041a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u044f \u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u0438 (Fuzziness):** \u0410\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 Manticore \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u044e\u0449\u0438\u0435 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u0432\u0435\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0432\u044b \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u043e\u0435.\n2. **\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0438 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b:** Manticore \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u0443\u044e \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0443 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435. \u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0432 \u0440\u0435\u0433\u0438\u043e\u043d\u0430\u0445 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u044f\u0437\u044b\u043a\u043e\u0432 \u0438\u043b\u0438 \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0432\u0432\u043e\u0434\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u044b \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u043d\u0430\u0431\u0440\u0430\u043b\u0438 \u00abghbdtn\u00bb, Manticore \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u00ab\u043f\u0440\u0438\u0432\u0435\u0442\u00bb \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e.\n\n\u0410\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 Manticore \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u043d\u0443\u0436\u0434\u044b \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u0433\u0438\u0431\u043a\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.\n\n![\u0410\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435](autocomplete.png)\n\n## \u0412\u042b\u0417\u041e\u0412 AUTOCOMPLETE\n\n> \u041f\u0420\u0418\u041c\u0415\u0427\u0410\u041d\u0418\u0415: `CALL AUTOCOMPLETE` \u0438 `/autocomplete` \u0442\u0440\u0435\u0431\u0443\u044e\u0442 [Manticore Buddy](../Installation/Manticore_Buddy.md). \u0415\u0441\u043b\u0438 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e Buddy \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d.\n\n<!-- example call_autocomplete -->\n\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 Manticore \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 SQL-\u0437\u0430\u043f\u0440\u043e\u0441 `CALL AUTOCOMPLETE` \u0438\u043b\u0438 \u0435\u0433\u043e JSON-\u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442 `/autocomplete`. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u0430\u0448\u0438\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.\n\n\u041f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b [\u0438\u043d\u0444\u0438\u043a\u0441\u044b](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#min_infix_len).\n\n**\u0412\u0430\u0436\u043d\u043e:** \u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0435\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 `min_infix_len`, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043a\u044d\u0448 \u043d\u0430 30 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 `CALL AUTOCOMPLETE`. \u041f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 `CALL AUTOCOMPLETE` (\u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u0430\u044f). \u0412 \u043a\u044d\u0448 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u0432\u044b \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u0435 `min_infix_len`, `CALL AUTOCOMPLETE` \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0447\u043d\u0451\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0443\u044e \u0441 `min_infix_len`.\n\n### \u041e\u0431\u0449\u0438\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\n\n#### SQL\nCODE_BLOCK_0\n\n#### JSON\nCODE_BLOCK_1\n\n#### \u041e\u043f\u0446\u0438\u0438\n- `layouts`: \u0421\u0442\u0440\u043e\u043a\u0430, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0438\u0437 \u043a\u043e\u0434\u043e\u0432 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043e\u043a \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e, \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0432\u0432\u043e\u0434\u0430, \u0432\u044b\u0437\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u043e\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00abghbdtn\u00bb \u0432\u043c\u0435\u0441\u0442\u043e \u00ab\u043f\u0440\u0438\u0432\u0435\u0442\u00bb). Manticore \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0430\u0445, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0442\u044c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0439 \u043d\u0443\u0436\u043d\u044b \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c 2 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0438. \u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b: us, ru, ua, se, pt, no, it, gr, uk, fr, es, dk, de, ch, br, bg, be (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 [\u0437\u0434\u0435\u0441\u044c](../Searching/Spell_correction.md#Options)). \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: none\n- `fuzziness`: `0`, `1` \u0438\u043b\u0438 `2` (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: `2`). \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u041b\u0435\u0432\u0435\u043d\u0448\u0442\u0435\u0439\u043d\u0430 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 `0` \u0434\u043b\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0447\u0451\u0442\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430\n- `preserve`: `0` \u0438\u043b\u0438 `1` (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: `0`). \u041f\u0440\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 `1` \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u043b\u043e\u0432\u0430 \u0431\u0435\u0437 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u043d\u0435\u0447\u0451\u0442\u043a\u0438\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00abhello wrld\u00bb \u0432\u0435\u0440\u043d\u0451\u0442 \u00abhello wrld\u00bb \u0438 \u00abhello world\u00bb). \u041f\u0440\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 `0` \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0432\u0430 \u0441 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c\u0438 \u043d\u0435\u0447\u0451\u0442\u043a\u0438\u043c\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f\u043c\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00abhello wrld\u00bb \u0432\u0435\u0440\u043d\u0451\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u00abhello world\u00bb). \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0445 \u0441\u043b\u043e\u0432 \u0438\u043b\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0438\u043c\u0451\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 Manticore Search\n- `prepend`: \u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 (0/1 \u0432 SQL). \u0415\u0441\u043b\u0438 true(1), \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0432\u0451\u0437\u0434\u043e\u0447\u043a\u0443 \u043f\u0435\u0440\u0435\u0434 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0441\u043b\u043e\u0432\u043e\u043c \u0434\u043b\u044f \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, `*word`)\n- `append`: \u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 (0/1 \u0432 SQL). \u0415\u0441\u043b\u0438 true(1), \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0432\u0451\u0437\u0434\u043e\u0447\u043a\u0443 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u0434\u043b\u044f \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, `word*`)\n- `expansion_len`: \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: `10`\n- `force_bigrams`: \u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 (0/1 \u0432 SQL). \u041f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0431\u0438\u0433\u0440\u0430\u043c\u043c\u044b (2-\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0435 n-\u0433\u0440\u0430\u043c\u043c\u044b) \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u0440\u0438\u0433\u0440\u0430\u043c\u043c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0434\u043b\u0438\u043d \u0441\u043b\u043e\u0432, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u0434\u043b\u044f \u0441\u043b\u043e\u0432 \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: `0` (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u0440\u0438\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u044f \u0441\u043b\u043e\u0432 \u0434\u043b\u0438\u043d\u043e\u0439 \u22656 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432)\n\n<!-- request SQL -->\n\nCODE_BLOCK_2\n\n<!-- request SQL with no fuzzy search -->\n\nCODE_BLOCK_3\n\n<!-- request JSON -->\n\nCODE_BLOCK_4\n\n<!-- response JSON -->\nCODE_BLOCK_5\n\n<!-- request SQL with preserve option -->\n\nCODE_BLOCK_6\n\n<!-- request JSON with preserve option -->\n\nCODE_BLOCK_7\n\n<!-- response JSON with preserve option -->\nCODE_BLOCK_8\n\n<!-- end -->\n\n<!-- example force_bigrams option -->\n##### \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 force_bigrams \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a\n\u041e\u043f\u0446\u0438\u044f `force_bigrams` \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0435\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a \u00abipohne\u00bb \u0432\u043c\u0435\u0441\u0442\u043e \u00abiphone\u00bb. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0431\u0438\u0433\u0440\u0430\u043c\u043c\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u0440\u0438\u0433\u0440\u0430\u043c\u043c, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043b\u0443\u0447\u0448\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\u043c\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.\n\n<!-- request SQL -->\nCODE_BLOCK_9\n\n<!-- response SQL -->\nCODE_BLOCK_10\n\n<!-- request JSON -->\nCODE_BLOCK_11\n\n<!-- response JSON -->\nCODE_BLOCK_12\n\n<!-- end -->\n\n#### \u0421\u0441\u044b\u043b\u043a\u0438\n* [\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f](https://github.manticoresearch.com/manticoresoftware/manticoresearch) \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f:\n ![\u041f\u0440\u0438\u043c\u0435\u0440 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f](autocomplete_github_demo.png){.scale-0.7}\n* \u0411\u043b\u043e\u0433 \u043e \u043d\u0435\u0447\u0435\u0442\u043a\u043e\u043c \u043f\u043e\u0438\u0441\u043a\u0435 \u0438 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 - https://manticoresearch.com/blog/new-fuzzy-search-and-autocomplete/\n\n## \u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\n\n\u0425\u043e\u0442\u044f `CALL AUTOCOMPLETE` \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0441\u043b\u0443\u0447\u0430\u0435\u0432, Manticore \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f:\n\n##### \u0410\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f\n\u0427\u0442\u043e\u0431\u044b \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c [\u0438\u043d\u0444\u0438\u043a\u0441\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#min_infix_len). \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u043d\u0435\u0446 \u043f\u043e\u043b\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0443\u043a\u0430\u0437\u0430\u0432 \u0435\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u043e \u0438:\n* \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f [\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 full-text](../Searching/Full_text_matching/Operators.md) `*` \u0434\u043b\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0441 \u043b\u044e\u0431\u044b\u043c\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438\n* \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f `^` \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043b\u044f\n* \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f `\"\"` \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0444\u0440\u0430\u0437\n* \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f [\u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432](../Searching/Highlighting.md)"
  17. },
  18. "is_code_or_comment": false,
  19. "model": "openai:gpt-4.1-mini",
  20. "updated_at": 1766339816
  21. },
  22. "__meta": {
  23. "source_text": "# Autocomplete\n\nAutocomplete, or word completion, predicts and suggests the end of a word or phrase as you type. It's commonly used in:\n- Search boxes on websites\n- Suggestions in search engines\n- Text fields in apps\n\nManticore offers an advanced autocomplete feature that gives suggestions while you type, similar to those in well-known search engines. This helps speed up searches and lets users find what they need faster.\n\nIn addition to basic autocomplete functionality, Manticore includes advanced features to enhance the user experience:\n\n1. **Spell Correction (Fuzziness):** Manticore's autocomplete helps correct spelling mistakes by using algorithms that recognize and fix common errors. This means even if you type something wrong, you can still find what you were looking for.\n2. **Keyboard Layout Autodetection:** Manticore can figure out which keyboard layout you are using. This is really useful in places where many languages are used, or if you accidentally type in the wrong language. For example, if you type \"ghbdtn\" by mistake, Manticore knows you meant to say \"\u043f\u0440\u0438\u0432\u0435\u0442\" (hello in Russian) and suggests the correct word.\n\nManticore's autocomplete can be tailored to match different needs and settings, making it a flexible tool for many applications.\n\n![Autocomplete](autocomplete.png)\n\n## CALL AUTOCOMPLETE\n\n> NOTE: `CALL AUTOCOMPLETE` and `/autocomplete` require [Manticore Buddy](../Installation/Manticore_Buddy.md). If it doesn't work, make sure Buddy is installed.\n\n<!-- example call_autocomplete -->\nTo use autocomplete in Manticore, use the `CALL AUTOCOMPLETE` SQL statement or its JSON equivalent `/autocomplete`. This feature provides word completion suggestions based on your indexed data.\n\nBefore you proceed, ensure that the table you intend to use for autocomplete has [infixes](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#min_infix_len) enabled.\n\n**Note:** There's an automatic check for `min_infix_len` in the table settings, which uses a 30-second cache to improve the performance of `CALL AUTOCOMPLETE`. After making changes to your table, there may be a brief delay the first time you use `CALL AUTOCOMPLETE` (though this is usually not noticeable). Only successful results are cached, so if you remove the table or disable `min_infix_len`, `CALL AUTOCOMPLETE` may temporarily return incorrect results until it eventually starts showing an error related to `min_infix_len`.\n\n### General syntax\n\n#### SQL\n```sql\nCALL AUTOCOMPLETE('query_beginning', 'table', [...options]);\n```\n\n#### JSON\n```json\nPOST /autocomplete\n{\n\t\"table\":\"table_name\",\n\t\"query\":\"query_beginning\"\n\t[,\"options\": {<autocomplete options>}]\n}\n```\n\n#### Options\n- `layouts`: A comma-separated string of keyboard layout codes for detecting typing errors caused by keyboard layout mismatches (e.g., typing \"ghbdtn\" instead of \"\u043f\u0440\u0438\u0432\u0435\u0442\" when using wrong layout). Manticore compares character positions across different layouts to suggest corrections. Requires at least 2 layouts to effectively detect mismatches. Available options: us, ru, ua, se, pt, no, it, gr, uk, fr, es, dk, de, ch, br, bg, be (more details [here](../Searching/Spell_correction.md#Options)). Default: none\n- `fuzziness`: `0`, `1`, or `2` (default: `2`). Maximum Levenshtein distance for finding typos. Set to `0` to disable fuzzy matching\n- `preserve`: `0` or `1` (default: `0`). When set to `1`, keeps words that don't have fuzzy matches in the search results (e.g., \"hello wrld\" returns both \"hello wrld\" and \"hello world\"). When set to `0`, only returns words with successful fuzzy matches (e.g., \"hello wrld\" returns only \"hello world\"). Particularly useful for preserving short words or proper nouns that may not exist in Manticore Search\n- `prepend`: Boolean (0/1 in SQL). If true(1), adds an asterisk before the last word for prefix expansion (e.g., `*word`)\n- `append`: Boolean (0/1 in SQL). If true(1), adds an asterisk after the last word for suffix expansion (e.g., `word*`)\n- `expansion_len`: Number of characters to expand in the last word. Default: `10`\n- `force_bigrams`: Boolean (0/1 in SQL). Forces the use of bigrams (2-character n-grams) instead of trigrams for all word lengths, which can improve matching for words with transposition errors. Default: `0` (use trigrams for words \u22656 characters)\n\n<!-- request SQL -->\n\n```sql\nmysql> CALL AUTOCOMPLETE('hello', 'comment');\n+------------+\n| query |\n+------------+\n| hello |\n| helio |\n| hell |\n| shell |\n| nushell |\n| powershell |\n| well |\n| help |\n+------------+\n```\n\n<!-- request SQL with no fuzzy search -->\n\n```sql\nmysql> CALL AUTOCOMPLETE('hello', 'comment', 0 as fuzziness);\n+-------+\n| query |\n+-------+\n| hello |\n+-------+\n```\n\n<!-- request JSON -->\n\n```json\nPOST /autocomplete\n{\n\t\"table\":\"comment\",\n\t\"query\":\"hello\"\n}\n```\n\n<!-- response JSON -->\n```json\n[\n {\n \"total\": 8,\n \"error\": \"\",\n \"warning\": \"\",\n \"columns\": [\n {\n \"query\": {\n \"type\": \"string\"\n }\n }\n ],\n \"data\": [\n {\n \"query\": \"hello\"\n },\n {\n \"query\": \"helio\"\n },\n {\n \"query\": \"hell\"\n },\n {\n \"query\": \"shell\"\n },\n {\n \"query\": \"nushell\"\n },\n {\n \"query\": \"powershell\"\n },\n {\n \"query\": \"well\"\n },\n {\n \"query\": \"help\"\n }\n ]\n }\n]\n```\n\n<!-- request SQL with preserve option -->\n\n```sql\nmysql> CALL AUTOCOMPLETE('hello wrld', 'comment', 1 as preserve);\n+------------+\n| query |\n+------------+\n| hello wrld |\n| hello world|\n+------------+\n```\n\n<!-- request JSON with preserve option -->\n\n```json\nPOST /autocomplete\n{\n\t\"table\":\"comment\",\n\t\"query\":\"hello wrld\",\n\t\"options\": {\n\t\t\"preserve\": 1\n\t}\n}\n```\n\n<!-- response JSON with preserve option -->\n```json\n[\n {\n \"total\": 2,\n \"error\": \"\",\n \"warning\": \"\",\n \"columns\": [\n {\n \"query\": {\n \"type\": \"string\"\n }\n }\n ],\n \"data\": [\n {\n \"query\": \"hello wrld\"\n },\n {\n \"query\": \"hello world\"\n }\n ]\n }\n]\n```\n\n<!-- end -->\n\n<!-- example force_bigrams option -->\n##### Using force_bigrams for better transposition handling\nThe `force_bigrams` option can help with words that have transposition errors, such as \"ipohne\" vs \"iphone\". By using bigrams instead of trigrams, the algorithm can better handle character transpositions.\n\n<!-- request SQL -->\n```sql\nmysql> CALL AUTOCOMPLETE('ipohne', 'products', 1 as force_bigrams);\n```\n\n<!-- response SQL -->\n```\n+--------+\n| query |\n+--------+\n| iphone |\n+--------+\n```\n\n<!-- request JSON -->\n```json\nPOST /autocomplete\n{\n\t\"table\":\"products\",\n\t\"query\":\"ipohne\",\n\t\"options\": {\n\t\t\"force_bigrams\": 1\n\t}\n}\n```\n\n<!-- response JSON -->\n```json\n[\n {\n \"total\": 1,\n \"error\": \"\",\n \"warning\": \"\",\n \"columns\": [\n {\n \"query\": {\n \"type\": \"string\"\n }\n }\n ],\n \"data\": [\n {\n \"query\": \"iphone\"\n }\n ]\n }\n]\n```\n\n<!-- end -->\n\n#### Links\n* [This demo](https://github.manticoresearch.com/manticoresoftware/manticoresearch) demonstrates the autocomplete functionality:\n ![Autocomplete example](autocomplete_github_demo.png){.scale-0.7}\n* Blog post about Fuzzy Search and Autocomplete - https://manticoresearch.com/blog/new-fuzzy-search-and-autocomplete/\n\n## Alternative autocomplete methods\n\nWhile `CALL AUTOCOMPLETE` is the recommended method for most use cases, Manticore also supports other controllable and customizable approaches to implement autocomplete functionality:\n\n##### Autocomplete a sentence\nTo autocomplete a sentence, you can use [infixed search](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#min_infix_len). You can find the end of a document field by providing its beginning and:\n* using the [full-text wildcard operator](../Searching/Full_text_matching/Operators.md) `*` to match any characters\n* optionally using `^` to start from the beginning of the field\n* optionally using `\"\"` for phrase matching\n* and using [result highlighting](../Searching/Highlighting.md)\n\nThere is an [article about it in our blog](https://manticoresearch.com/blog/simple-autocomplete-with-manticore/) and an [interactive course](https://play.manticoresearch.com/simpleautocomplete/). A quick example is:\n* Let's assume you have a document: `My cat loves my dog. The cat (Felis catus) is a domestic species of small carnivorous mammal.`\n* Then you can use `^`, `\"\"`, and `*` so as the user is typing, you make queries like: `^\"m*\"`, `^\"my *\"`, `^\"my c*\"`, `^\"my ca*\"` and so on\n* It will find the document, and if you also do [highlighting](../Searching/Highlighting.md), you will get something like: `<b>My cat</b> loves my dog. The cat ( ...`\n\n##### Autocomplete a word\nIn some cases, all you need is to autocomplete a single word or a couple of words. In this case, you can use `CALL KEYWORDS`.\n\n### CALL KEYWORDS\n`CALL KEYWORDS` is available through the SQL interface and offers a way to examine how keywords are tokenized or to obtain the tokenized forms of specific keywords. If the table enables [infixes](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#min_infix_len), it allows you to quickly find possible endings for given keywords, making it suitable for autocomplete functionality.\n\nThis is a great alternative to general infixed search, as it provides higher performance since it only needs the table's dictionary, not the documents themselves.\n\n### General syntax\n<!-- example keywords -->\n```sql\nCALL KEYWORDS(text, table [, options])\n```\nThe `CALL KEYWORDS` statement divides text into keywords. It returns the tokenized and normalized forms of the keywords, and if desired, keyword statistics. Additionally, it provides the position of each keyword in the query and all forms of tokenized keywords when the table enables [lemmatizers](../Creating_a_table/NLP_and_tokenization/Morphology.md).\n\n| Parameter | Description |\n| - | - |\n| text | Text to break down to keywords |\n| table | Name of the table from which to take the text processing settings |\n| 0/1 as stats | Show statistics of keywords, default is 0 |\n| 0/1 as fold_wildcards | Fold wildcards, default is 0 |\n| 0/1 as fold_lemmas | Fold morphological lemmas, default is 0 |\n| 0/1 as fold_blended | Fold blended words, default is 0 |\n| N as expansion_limit | Override [expansion_limit](../Creating_a_table/NLP_and_tokenization/Wildcard_searching_settings.md#expansion_limit) defined in the server configuration, default is 0 (use value from the configuration) |\n| docs/hits as sort_mode | Sorts output results by either 'docs' or 'hits'. No sorting is applied by default. |\n| jieba_mode | Jieba segmentation mode for the query. See [jieba_mode](../Creating_a_table/NLP_and_tokenization/Morphology.md#jieba_mode) for more details |\n\nThe examples show how it works if assuming the user is trying to get an autocomplete for \"my cat ...\". So on the application side all you need to do is to suggest the user the endings from the column \"normalized\" for each new word. It often makes sense to sort by hits or docs using `'hits' as sort_mode` or `'docs' as sort_mode`.\n\n<!-- intro -->\n##### Examples:\n\n<!-- request Examples -->\n\n```sql\nMySQL [(none)]> CALL KEYWORDS('m*', 't', 1 as stats);\n+------+-----------+------------+------+------+\n| qpos | tokenized | normalized | docs | hits |\n+------+-----------+------------+------+------+\n| 1 | m* | my | 1 | 2 |\n| 1 | m* | mammal | 1 | 1 |\n+------+-----------+------------+------+------+\n\nMySQL [(none)]> CALL KEYWORDS('my*', 't', 1 as stats);\n+------+-----------+------------+------+------+\n| qpos | tokenized | normalized | docs | hits |\n+------+-----------+------------+------+------+\n| 1 | my* | my | 1 | 2 |\n+------+-----------+------------+------+------+\n\nMySQL [(none)]> CALL KEYWORDS('c*', 't', 1 as stats, 'hits' as sort_mode);\n+------+-----------+-------------+------+------+\n| qpos | tokenized | normalized | docs | hits |\n+------+-----------+-------------+------+------+\n| 1 | c* | cat | 1 | 2 |\n| 1 | c* | carnivorous | 1 | 1 |\n| 1 | c* | catus | 1 | 1 |\n+------+-----------+-------------+------+------+\n\nMySQL [(none)]> CALL KEYWORDS('ca*', 't', 1 as stats, 'hits' as sort_mode);\n+------+-----------+-------------+------+------+\n| qpos | tokenized | normalized | docs | hits |\n+------+-----------+-------------+------+------+\n| 1 | ca* | cat | 1 | 2 |\n| 1 | ca* | carnivorous | 1 | 1 |\n| 1 | ca* | catus | 1 | 1 |\n+------+-----------+-------------+------+------+\n\nMySQL [(none)]> CALL KEYWORDS('cat*', 't', 1 as stats, 'hits' as sort_mode);\n+------+-----------+------------+------+------+\n| qpos | tokenized | normalized | docs | hits |\n+------+-----------+------------+------+------+\n| 1 | cat* | cat | 1 | 2 |\n| 1 | cat* | catus | 1 | 1 |\n+------+-----------+------------+------+------+\n```\n<!-- end -->\n\n<!-- example bigram -->\nThere is a nice trick how you can improve the above algorithm - use [bigram_index](../Creating_a_table/NLP_and_tokenization/Low-level_tokenization.md#bigram_index). When you have it enabled for the table what you get in it is not just a single word, but each pair of words standing one after another indexed as a separate token.\n\nThis allows to predict not just the current word's ending, but the next word too which is especially beneficial for the purpose of autocomplete.\n\n<!-- intro -->\n##### Examples:\n\n<!-- request Examples -->\n\n```sql\nMySQL [(none)]> CALL KEYWORDS('m*', 't', 1 as stats, 'hits' as sort_mode);\n+------+-----------+------------+------+------+\n| qpos | tokenized | normalized | docs | hits |\n+------+-----------+------------+------+------+\n| 1 | m* | my | 1 | 2 |\n| 1 | m* | mammal | 1 | 1 |\n| 1 | m* | my cat | 1 | 1 |\n| 1 | m* | my dog | 1 | 1 |\n+------+-----------+------------+------+------+\n\nMySQL [(none)]> CALL KEYWORDS('my*', 't', 1 as stats, 'hits' as sort_mode);\n+------+-----------+------------+------+------+\n| qpos | tokenized | normalized | docs | hits |\n+------+-----------+------------+------+------+\n| 1 | my* | my | 1 | 2 |\n| 1 | my* | my cat | 1 | 1 |\n| 1 | my* | my dog | 1 | 1 |\n+------+-----------+------------+------+------+\n\nMySQL [(none)]> CALL KEYWORDS('c*', 't', 1 as stats, 'hits' as sort_mode);\n+------+-----------+--------------------+------+------+\n| qpos | tokenized | normalized | docs | hits |\n+------+-----------+--------------------+------+------+\n| 1 | c* | cat | 1 | 2 |\n| 1 | c* | carnivorous | 1 | 1 |\n| 1 | c* | carnivorous mammal | 1 | 1 |\n| 1 | c* | cat felis | 1 | 1 |\n| 1 | c* | cat loves | 1 | 1 |\n| 1 | c* | catus | 1 | 1 |\n| 1 | c* | catus is | 1 | 1 |\n+------+-----------+--------------------+------+------+\n\nMySQL [(none)]> CALL KEYWORDS('ca*', 't', 1 as stats, 'hits' as sort_mode);\n+------+-----------+--------------------+------+------+\n| qpos | tokenized | normalized | docs | hits |\n+------+-----------+--------------------+------+------+\n| 1 | ca* | cat | 1 | 2 |\n| 1 | ca* | carnivorous | 1 | 1 |\n| 1 | ca* | carnivorous mammal | 1 | 1 |\n| 1 | ca* | cat felis | 1 | 1 |\n| 1 | ca* | cat loves | 1 | 1 |\n| 1 | ca* | catus | 1 | 1 |\n| 1 | ca* | catus is | 1 | 1 |\n+------+-----------+--------------------+------+------+\n\nMySQL [(none)]> CALL KEYWORDS('cat*', 't', 1 as stats, 'hits' as sort_mode);\n+------+-----------+------------+------+------+\n| qpos | tokenized | normalized | docs | hits |\n+------+-----------+------------+------+------+\n| 1 | cat* | cat | 1 | 2 |\n| 1 | cat* | cat felis | 1 | 1 |\n| 1 | cat* | cat loves | 1 | 1 |\n| 1 | cat* | catus | 1 | 1 |\n| 1 | cat* | catus is | 1 | 1 |\n+------+-----------+------------+------+------+\n```\n<!-- end -->\n\n`CALL KEYWORDS` supports distributed tables so no matter how big your data set you can benefit from using it.\n<!-- proofread -->\n\n",
  24. "updated_at": 1768530797,
  25. "source_md5": "80abbd97f820a3e2d7299d86fdd00dea"
  26. }
  27. }