| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- {
- "072055cae726b8730dbf87acdc5adc7cf0d2f1d26900366444e1bbd7fca29e43": {
- "original": "CODE_BLOCK_83\nindexApi.delete({\"table\" : \"products\", \"query\": {\"range\":{\"price\":{\"lte\":10}}}})\nCODE_BLOCK_84\nawait indexApi.delete({\"table\" : \"products\", \"query\": {\"range\":{\"price\":{\"lte\":10}}}})\nCODE_BLOCK_85\nres = await indexApi.delete({\"table\" : \"products\", \"query\": {\"range\":{\"price\":{\"lte\":10}}}});\nCODE_BLOCK_86\nDeleteDocumentRequest deleteRequest = new DeleteDocumentRequest();\nquery = new HashMap<String,Object>();\nquery.put(\"range\",new HashMap<String,Object>(){{\n put(\"price\",new HashMap<String,Object>(){{\n put(\"lte\",10);\n }});\n}});\ndeleteRequest.index(\"products\").setQuery(query);\nindexApi.delete(deleteRequest);\n\nCODE_BLOCK_87\nDictionary<string, Object> price = new Dictionary<string, Object>();\nprice.Add(\"lte\", 10);\nDictionary<string, Object> range = new Dictionary<string, Object>();\nrange.Add(\"price\", price);\nDeleteDocumentRequest deleteDocumentRequest = new DeleteDocumentRequest(index: \"products\", query: range);\nindexApi.Delete(deleteDocumentRequest);\nCODE_BLOCK_88\nlet mut price_range= HashMap::new();\nprice_range.insert(\"lte\".to_string(), serde_json::json!(10));\nlet mut range= HashMap::new();\nrange.insert(\"price\".to_string(), serde_json::json!(price_range));\nlet delete_req = DeleteDocumentRequest {\n table: \"products\".to_string(),\n query: serde_json::json!(range),\n ..Default::default(),\n};\nindex_api.delete(delete_req).await;\nCODE_BLOCK_89\nres = await indexApi.delete({\n index: 'test',\n query: { match: { '*': 'Text 1' } },\n});\nCODE_BLOCK_90\ndelRequest := manticoreclient.NewDeleteDocumentRequest(\"test\")\nmatchExpr := map[string]interface{} {\"*\": \"Text 1t\"}\ndelQuery := map[string]interface{} {\"match\": matchExpr }\ndelRequest.SetQuery(delQuery)\nres, _, _ := apiClient.IndexAPI.Delete(context.Background()).DeleteDocumentRequest(*delRequest).Execute();\nCODE_BLOCK_91",
- "translations": {
- "chinese": "CODE_BLOCK_83\nindexApi.delete({\"table\" : \"products\", \"query\": {\"range\":{\"price\":{\"lte\":10}}}})\nCODE_BLOCK_84\nawait indexApi.delete({\"table\" : \"products\", \"query\": {\"range\":{\"price\":{\"lte\":10}}}})\nCODE_BLOCK_85\nres = await indexApi.delete({\"table\" : \"products\", \"query\": {\"range\":{\"price\":{\"lte\":10}}}});\nCODE_BLOCK_86\nDeleteDocumentRequest deleteRequest = new DeleteDocumentRequest();\nquery = new HashMap<String,Object>();\nquery.put(\"range\",new HashMap<String,Object>(){{\n put(\"price\",new HashMap<String,Object>(){{\n put(\"lte\",10);\n }});\n}});\ndeleteRequest.index(\"products\").setQuery(query);\nindexApi.delete(deleteRequest);\n\nCODE_BLOCK_87\nDictionary<string, Object> price = new Dictionary<string, Object>();\nprice.Add(\"lte\", 10);\nDictionary<string, Object> range = new Dictionary<string, Object>();\nrange.Add(\"price\", price);\nDeleteDocumentRequest deleteDocumentRequest = new DeleteDocumentRequest(index: \"products\", query: range);\nindexApi.Delete(deleteDocumentRequest);\nCODE_BLOCK_88\nlet mut price_range= HashMap::new();\nprice_range.insert(\"lte\".to_string(), serde_json::json!(10));\nlet mut range= HashMap::new();\nrange.insert(\"price\".to_string(), serde_json::json!(price_range));\nlet delete_req = DeleteDocumentRequest {\n table: \"products\".to_string(),\n query: serde_json::json!(range),\n ..Default::default(),\n};\nindex_api.delete(delete_req).await;\nCODE_BLOCK_89\nres = await indexApi.delete({\n index: 'test',\n query: { match: { '*': 'Text 1' } },\n});\nCODE_BLOCK_90\ndelRequest := manticoreclient.NewDeleteDocumentRequest(\"test\")\nmatchExpr := map[string]interface{} {\"*\": \"Text 1t\"}\ndelQuery := map[string]interface{} {\"match\": matchExpr }\ndelRequest.SetQuery(delQuery)\nres, _, _ := apiClient.IndexAPI.Delete(context.Background()).DeleteDocumentRequest(*delRequest).Execute();\nCODE_BLOCK_91",
- "russian": "CODE_BLOCK_83\nindexApi.delete({\"table\" : \"products\", \"query\": {\"range\":{\"price\":{\"lte\":10}}}})\nCODE_BLOCK_84\nawait indexApi.delete({\"table\" : \"products\", \"query\": {\"range\":{\"price\":{\"lte\":10}}}})\nCODE_BLOCK_85\nres = await indexApi.delete({\"table\" : \"products\", \"query\": {\"range\":{\"price\":{\"lte\":10}}}});\nCODE_BLOCK_86\nDeleteDocumentRequest deleteRequest = new DeleteDocumentRequest();\nquery = new HashMap<String,Object>();\nquery.put(\"range\",new HashMap<String,Object>(){{\n put(\"price\",new HashMap<String,Object>(){{\n put(\"lte\",10);\n }});\n}});\ndeleteRequest.index(\"products\").setQuery(query);\nindexApi.delete(deleteRequest);\n\nCODE_BLOCK_87\nDictionary<string, Object> price = new Dictionary<string, Object>();\nprice.Add(\"lte\", 10);\nDictionary<string, Object> range = new Dictionary<string, Object>();\nrange.Add(\"price\", price);\nDeleteDocumentRequest deleteDocumentRequest = new DeleteDocumentRequest(index: \"products\", query: range);\nindexApi.Delete(deleteDocumentRequest);\nCODE_BLOCK_88\nlet mut price_range= HashMap::new();\nprice_range.insert(\"lte\".to_string(), serde_json::json!(10));\nlet mut range= HashMap::new();\nrange.insert(\"price\".to_string(), serde_json::json!(price_range));\nlet delete_req = DeleteDocumentRequest {\n table: \"products\".to_string(),\n query: serde_json::json!(range),\n ..Default::default(),\n};\nindex_api.delete(delete_req).await;\nCODE_BLOCK_89\nres = await indexApi.delete({\n index: 'test',\n query: { match: { '*': 'Text 1' } },\n});\nCODE_BLOCK_90\ndelRequest := manticoreclient.NewDeleteDocumentRequest(\"test\")\nmatchExpr := map[string]interface{} {\"*\": \"Text 1t\"}\ndelQuery := map[string]interface{} {\"match\": matchExpr }\ndelRequest.SetQuery(delQuery)\nres, _, _ := apiClient.IndexAPI.Delete(context.Background()).DeleteDocumentRequest(*delRequest).Execute();\nCODE_BLOCK_91"
- },
- "is_code_or_comment": false,
- "model": "openai:gpt-4.1-mini",
- "updated_at": 1766339810
- },
- "fa5b7a33b06f4e492efabd6c9ac83b56c881b9c9f57321605730376d522f7afc": {
- "original": "# Quick start guide\n\n<!-- example install -->\n## Install and start Manticore\n\nYou can install and start Manticore easily on various operating systems, including Ubuntu, Centos, Debian, Windows, and MacOS. Additionally, you can also use Manticore as a Docker container.\n\n<!-- intro -->\n### Ubuntu\n\n<!-- request Ubuntu -->\nCODE_BLOCK_0\n\n<!-- intro -->\n### Debian\n\n<!-- request Debian -->\nCODE_BLOCK_1\n\n<!-- intro -->\n### Centos\n\n<!-- request Centos -->\nCODE_BLOCK_2\n\n<!-- intro -->\n### Windows\n\n<!-- request Windows -->\n* Download the Windows archive from https://manticoresearch.com/install/\n* Extract all files from the archive to `C:\\Manticore`\n* Run the following command to install Manticore as a service:\n* ```bash\n C:\\Manticore\\bin\\searchd --install --config C:\\Manticore\\sphinx.conf.in --servicename Manticore\nCODE_BLOCK_3\nbrew install manticoresearch\nbrew services start manticoresearch\nCODE_BLOCK_4\ndocker pull manticoresearch/manticore\ndocker run --name manticore -p9306:9306 -p9308:9308 -p9312:9312 -d manticoresearch/manticore\nCODE_BLOCK_5\nmysql -h0 -P9306\nCODE_BLOCK_6\ncurl -s \"http://localhost:9308/search\"\nCODE_BLOCK_7\n// https://github.com/manticoresoftware/manticoresearch-php\nrequire_once __DIR__ . '/vendor/autoload.php';\n$config = ['host'=>'127.0.0.1','port'=>9308];\n$client = new \\Manticoresearch\\Client($config);\nCODE_BLOCK_8\n// https://github.com/manticoresoftware/manticoresearch-python\nimport manticoresearch\nconfig = manticoresearch.Configuration(\n host = \"http://127.0.0.1:9308\"\n)\nclient = manticoresearch.ApiClient(config)\nindexApi = manticoresearch.IndexApi(client)\nsearchApi = manticoresearch.SearchApi(client)\nutilsApi = manticoresearch.UtilsApi(client)\nCODE_BLOCK_9\n// https://github.com/manticoresoftware/manticoresearch-python-asyncio\nimport manticoresearch\nconfig = manticoresearch.Configuration(\n host = \"http://127.0.0.1:9308\"\n)\nasync with manticoresearch.ApiClient(config) as client:\n indexApi = manticoresearch.IndexApi(client)\n searchApi = manticoresearch.searchApi(client)\n utilsApi = manticoresearch.UtilsApi(client)\nCODE_BLOCK_10\n// https://github.com/manticoresoftware/manticoresearch-javascript\nvar Manticoresearch = require('manticoresearch');\nvar client= new Manticoresearch.ApiClient()\nclient.basePath=\"http://127.0.0.1:9308\";\nindexApi = new Manticoresearch.IndexApi(client);\nsearchApi = new Manticoresearch.SearchApi(client);\nutilsApi = new Manticoresearch.UtilsApi(client);\nCODE_BLOCK_11\n// https://github.com/manticoresoftware/manticoresearch-java\nimport com.manticoresearch.client.*;\nimport com.manticoresearch.client.model.*;\nimport com.manticoresearch.client.api.*;\n...\nApiClient client = Configuration.getDefaultApiClient();\nclient.setBasePath(\"http://127.0.0.1:9308\");\n...\nIndexApi indexApi = new IndexApi(client);\nSearchApi searchApi = new UtilsApi(client);\nUtilsApi utilsApi = new UtilsApi(client);\nCODE_BLOCK_12\n// https://github.com/manticoresoftware/manticoresearch-net\nusing System.Net.Http;\n...\nusing ManticoreSearch.Client;\nusing ManticoreSearch.Api;\nusing ManticoreSearch.Model;\n...\nconfig = new Configuration();\nconfig.BasePath = \"http://localhost:9308\";\nhttpClient = new HttpClient();\nhttpClientHandler = new HttpClientHandler();\n...\nvar indexApi = new IndexApi(httpClient, config, httpClientHandler);\nvar searchApi = new SearchApi(httpClient, config, httpClientHandler);\nvar utilsApi = new UtilsApi(httpClient, config, httpClientHandler);\nCODE_BLOCK_13\n// https://github.com/manticoresoftware/manticoresearch-rust\nuse std::sync::Arc;\nuse manticoresearch::{\n apis::{\n {configuration::Configuration,IndexApi,IndexApiClient,SearchApi,SearchApiClient,UtilsApi,UtilsApiClient}\n },\n};",
- "translations": {
- "chinese": "# \u5feb\u901f\u5165\u95e8\u6307\u5357\n\n<!-- example install -->\n## \u5b89\u88c5\u5e76\u542f\u52a8 Manticore\n\n\u60a8\u53ef\u4ee5\u8f7b\u677e\u5730\u5728\u591a\u79cd\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u5b89\u88c5\u5e76\u542f\u52a8 Manticore\uff0c\u5305\u62ec Ubuntu\u3001Centos\u3001Debian\u3001Windows \u548c MacOS\u3002\u6b64\u5916\uff0c\u60a8\u8fd8\u53ef\u4ee5\u5c06 Manticore \u4f5c\u4e3a Docker \u5bb9\u5668\u4f7f\u7528\u3002\n\n<!-- intro -->\n### Ubuntu\n\n<!-- request Ubuntu -->\nCODE_BLOCK_0\n\n<!-- intro -->\n### Debian\n\n<!-- request Debian -->\nCODE_BLOCK_1\n\n<!-- intro -->\n### Centos\n\n<!-- request Centos -->\nCODE_BLOCK_2\n\n<!-- intro -->\n### Windows\n\n<!-- request Windows -->\n* \u4ece https://manticoresearch.com/install/ \u4e0b\u8f7d Windows \u538b\u7f29\u5305\n* \u5c06\u538b\u7f29\u5305\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u89e3\u538b\u81f3 `C:\\Manticore`\n* \u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5c06 Manticore \u5b89\u88c5\u4e3a\u670d\u52a1:\n* ```bash\n C:\\Manticore\\bin\\searchd --install --config C:\\Manticore\\sphinx.conf.in --servicename Manticore\nCODE_BLOCK_3\nbrew install manticoresearch\nbrew services start manticoresearch\nCODE_BLOCK_4\ndocker pull manticoresearch/manticore\ndocker run --name manticore -p9306:9306 -p9308:9308 -p9312:9312 -d manticoresearch/manticore\nCODE_BLOCK_5\nmysql -h0 -P9306\nCODE_BLOCK_6\ncurl -s \"http://localhost:9308/search\"\nCODE_BLOCK_7\n// https://github.com/manticoresoftware/manticoresearch-php\nrequire_once __DIR__ . '/vendor/autoload.php';\n$config = ['host'=>'127.0.0.1','port'=>9308];\n$client = new \\Manticoresearch\\Client($config);\nCODE_BLOCK_8\n// https://github.com/manticoresoftware/manticoresearch-python\nimport manticoresearch\nconfig = manticoresearch.Configuration(\n host = \"http://127.0.0.1:9308\"\n)\nclient = manticoresearch.ApiClient(config)\nindexApi = manticoresearch.IndexApi(client)\nsearchApi = manticoresearch.SearchApi(client)\nutilsApi = manticoresearch.UtilsApi(client)\nCODE_BLOCK_9\n// https://github.com/manticoresoftware/manticoresearch-python-asyncio\nimport manticoresearch\nconfig = manticoresearch.Configuration(\n host = \"http://127.0.0.1:9308\"\n)\nasync with manticoresearch.ApiClient(config) as client:\n indexApi = manticoresearch.IndexApi(client)\n searchApi = manticoresearch.searchApi(client)\n utilsApi = manticoresearch.UtilsApi(client)\nCODE_BLOCK_10\n// https://github.com/manticoresoftware/manticoresearch-javascript\nvar Manticoresearch = require('manticoresearch');\nvar client= new Manticoresearch.ApiClient()\nclient.basePath=\"http://127.0.0.1:9308\";\nindexApi = new Manticoresearch.IndexApi(client);\nsearchApi = new Manticoresearch.SearchApi(client);\nutilsApi = new Manticoresearch.UtilsApi(client);\nCODE_BLOCK_11\n// https://github.com/manticoresoftware/manticoresearch-java\nimport com.manticoresearch.client.*;\nimport com.manticoresearch.client.model.*;\nimport com.manticoresearch.client.api.*;\n...\nApiClient client = Configuration.getDefaultApiClient();\nclient.setBasePath(\"http://127.0.0.1:9308\");\n...\nIndexApi indexApi = new IndexApi(client);\nSearchApi searchApi = new UtilsApi(client);\nUtilsApi utilsApi = new UtilsApi(client);\nCODE_BLOCK_12\n// https://github.com/manticoresoftware/manticoresearch-net\nusing System.Net.Http;\n...\nusing ManticoreSearch.Client;\nusing ManticoreSearch.Api;\nusing ManticoreSearch.Model;\n...\nconfig = new Configuration();\nconfig.BasePath = \"http://localhost:9308\";\nhttpClient = new HttpClient();\nhttpClientHandler = new HttpClientHandler();\n...\nvar indexApi = new IndexApi(httpClient, config, httpClientHandler);\nvar searchApi = new SearchApi(httpClient, config, httpClientHandler);\nvar utilsApi = new UtilsApi(httpClient, config, httpClientHandler);\nCODE_BLOCK_13\n// https://github.com/manticoresoftware/manticoresearch-rust\nuse std::sync::Arc;\nuse manticoresearch::{\n apis::{\n {configuration::Configuration,IndexApi,IndexApiClient,SearchApi,SearchApiClient,UtilsApi,UtilsApiClient}\n },\n};",
- "russian": "# \u0411\u044b\u0441\u0442\u0440\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\n\n<!-- example install -->\n## \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a Manticore\n\n\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0435\u0433\u043a\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Manticore \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f Ubuntu, Centos, Debian, Windows \u0438 MacOS. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Manticore \u0432 \u0432\u0438\u0434\u0435 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.\n\n<!-- intro -->\n### Ubuntu\n\n<!-- request Ubuntu -->\nCODE_BLOCK_0\n\n<!-- intro -->\n### Debian\n\n<!-- request Debian -->\nCODE_BLOCK_1\n\n<!-- intro -->\n### Centos\n\n<!-- request Centos -->\nCODE_BLOCK_2\n\n<!-- intro -->\n### Windows\n\n<!-- request Windows -->\n* \u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0430\u0440\u0445\u0438\u0432 \u0434\u043b\u044f Windows \u0441 https://manticoresearch.com/install/\n* \u0420\u0430\u0441\u043f\u0430\u043a\u0443\u0439\u0442\u0435 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430 \u0432 `C:\\Manticore`\n* \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Manticore \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0436\u0431\u044b:\n* ```bash\n C:\\Manticore\\bin\\searchd --install --config C:\\Manticore\\sphinx.conf.in --servicename Manticore\nCODE_BLOCK_3\nbrew install manticoresearch\nbrew services start manticoresearch\nCODE_BLOCK_4\ndocker pull manticoresearch/manticore\ndocker run --name manticore -p9306:9306 -p9308:9308 -p9312:9312 -d manticoresearch/manticore\nCODE_BLOCK_5\nmysql -h0 -P9306\nCODE_BLOCK_6\ncurl -s \"http://localhost:9308/search\"\nCODE_BLOCK_7\n// https://github.com/manticoresoftware/manticoresearch-php\nrequire_once __DIR__ . '/vendor/autoload.php';\n$config = ['host'=>'127.0.0.1','port'=>9308];\n$client = new \\Manticoresearch\\Client($config);\nCODE_BLOCK_8\n// https://github.com/manticoresoftware/manticoresearch-python\nimport manticoresearch\nconfig = manticoresearch.Configuration(\n host = \"http://127.0.0.1:9308\"\n)\nclient = manticoresearch.ApiClient(config)\nindexApi = manticoresearch.IndexApi(client)\nsearchApi = manticoresearch.SearchApi(client)\nutilsApi = manticoresearch.UtilsApi(client)\nCODE_BLOCK_9\n// https://github.com/manticoresoftware/manticoresearch-python-asyncio\nimport manticoresearch\nconfig = manticoresearch.Configuration(\n host = \"http://127.0.0.1:9308\"\n)\nasync with manticoresearch.ApiClient(config) as client:\n indexApi = manticoresearch.IndexApi(client)\n searchApi = manticoresearch.searchApi(client)\n utilsApi = manticoresearch.UtilsApi(client)\nCODE_BLOCK_10\n// https://github.com/manticoresoftware/manticoresearch-javascript\nvar Manticoresearch = require('manticoresearch');\nvar client= new Manticoresearch.ApiClient()\nclient.basePath=\"http://127.0.0.1:9308\";\nindexApi = new Manticoresearch.IndexApi(client);\nsearchApi = new Manticoresearch.SearchApi(client);\nutilsApi = new Manticoresearch.UtilsApi(client);\nCODE_BLOCK_11\n// https://github.com/manticoresoftware/manticoresearch-java\nimport com.manticoresearch.client.*;\nimport com.manticoresearch.client.model.*;\nimport com.manticoresearch.client.api.*;\n...\nApiClient client = Configuration.getDefaultApiClient();\nclient.setBasePath(\"http://127.0.0.1:9308\");\n...\nIndexApi indexApi = new IndexApi(client);\nSearchApi searchApi = new UtilsApi(client);\nUtilsApi utilsApi = new UtilsApi(client);\nCODE_BLOCK_12\n// https://github.com/manticoresoftware/manticoresearch-net\nusing System.Net.Http;\n...\nusing ManticoreSearch.Client;\nusing ManticoreSearch.Api;\nusing ManticoreSearch.Model;\n...\nconfig = new Configuration();\nconfig.BasePath = \"http://localhost:9308\";\nhttpClient = new HttpClient();\nhttpClientHandler = new HttpClientHandler();\n...\nvar indexApi = new IndexApi(httpClient, config, httpClientHandler);\nvar searchApi = new SearchApi(httpClient, config, httpClientHandler);\nvar utilsApi = new UtilsApi(httpClient, config, httpClientHandler);\nCODE_BLOCK_13\n// https://github.com/manticoresoftware/manticoresearch-rust\nuse std::sync::Arc;\nuse manticoresearch::{\n apis::{\n {configuration::Configuration,IndexApi,IndexApiClient,SearchApi,SearchApiClient,UtilsApi,UtilsApiClient}\n },\n};"
- },
- "is_code_or_comment": false,
- "model": "openai:gpt-4.1-mini",
- "updated_at": 1766339818
- },
- "62cc2827c0e2dbc9447edefed5e859eafaff52b5f07f29f2d9c3634cc516b967": {
- "original": "}};\nsearchRequest.setHighlight(highlight);\nsearchResponse = searchApi.search(searchRequest);\nCODE_BLOCK_55\nclass SearchResponse {\n took: 84\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\n\n\nCODE_BLOCK_56\nobject query = new { query_string=\"@title remove hair\" };\nvar searchRequest = new SearchRequest(\"products\", query);\nvar highlight = new Highlight();\nhighlight.Fieldnames = new List<string> {\"title\"};\nsearchRequest.Highlight = highlight;\nsearchResponse = searchApi.Search(searchRequest);\nCODE_BLOCK_57\nclass SearchResponse {\n took: 103\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\nCODE_BLOCK_58\nlet query = SearchQuery {\n query_string: Some(serde_json::json!(\"@title remove hair\").into()),\n ..Default::default()\n};\nlet highlight = Highlight {\n fields: Some(serde_json::json!([\"title\"]).into()),\n ..Default::default()\n};\nlet search_req = SearchRequest {\n table: \"products\".to_string(),\n query: Some(Box::new(query)),\n highlight: Some(Box::new(highlight)),\n ..Default::default(),\n};\nlet search_res = search_api.search(search_req).await;\nCODE_BLOCK_59\nclass SearchResponse {\n took: 103\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\nCODE_BLOCK_60\nres = await searchApi.search({\n index: 'test',\n query: { query_string: {'text 1'} },\n highlight: {'fields': ['content'] }\n});\nCODE_BLOCK_61\n{\n \"hits\":\n {\n \"hits\":\n [{\n \"_id\": 1,\n \"_score\": 1400,\n \"_source\": {\"content\":\"Text 1\",\"name\":\"Doc 1\",\"cat\":1},\n \"highlight\": {\"content\":[\"<b>Text 1</b>\"]}\n }],\n \"total\": 1\n },\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0\n}\nCODE_BLOCK_62\nsearchRequest := manticoreclient.NewSearchRequest(\"test\")\nquery := map[string]interface{} {\"query_string\": \"text 1\"};\nsearchRequest.SetQuery(query);\n\nhighlightField := manticoreclient.NewHighlightField(\"content\")\nfields := []interface{}{ highlightField }\nhighlight := manticoreclient.NewHighlight()\nhighlight.SetFields(fields)\nsearchRequest.SetHighlight(highlight);\n\nres, _, _ := apiClient.SearchAPI.Search(context.Background()).SearchRequest(*searchRequest).Execute()\nCODE_BLOCK_63\n{\n \"hits\":\n {\n \"hits\":\n [{\n \"_id\": 1,\n \"_score\": 1400,\n \"_source\": {\"content\":\"Text 1\",\"name\":\"Doc 1\",\"cat\":1},\n \"highlight\": {\"content\":[\"<b>Text 1</b>\"]}\n }],\n \"total\": 1\n },\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0\n}\nCODE_BLOCK_64\nupdate products set price=18.5 where id = 1513686608316989452;\nCODE_BLOCK_65\nQuery OK, 1 row affected (0.00 sec)\nCODE_BLOCK_66\nPOST /update\n{\n \"table\": \"products\",\n \"id\": 1513686608316989452,\n \"doc\":\n {\n \"price\": 18.5\n }\n}\nCODE_BLOCK_67\n{\n \"table\": \"products\",\n \"_id\": 1513686608316989452,\n \"result\": \"updated\"\n}\nCODE_BLOCK_68\n$doc = [\n 'body' => [\n 'table' => 'products',\n 'id' => 2,\n 'doc' => [\n 'price' => 18.5\n ]\n ]\n];\n\n$response = $client->update($doc);\nCODE_BLOCK_69\nindexApi = api = manticoresearch.IndexApi(client)\nindexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}})\nCODE_BLOCK_70\nindexApi = api = manticoresearch.IndexApi(client)\nawait indexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}})\nCODE_BLOCK_71\nres = await indexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}});\nCODE_BLOCK_72\nUpdateDocumentRequest updateRequest = new UpdateDocumentRequest();\ndoc = new HashMap<String,Object >(){{\n put(\"price\",18.5);\n}};\nupdateRequest.index(\"products\").id(1513686608316989452L).setDoc(doc);\nindexApi.update(updateRequest);\nCODE_BLOCK_73\nDictionary<string, Object> doc = new Dictionary<string, Object>();\ndoc.Add(\"price\", 18.5);\nUpdateDocumentRequest updateDocumentRequest = new UpdateDocumentRequest(index: \"products\", id: 1513686608316989452L, doc: doc);\nindexApi.Update(updateDocumentRequest);\nCODE_BLOCK_74\nlet mut doc = HashMap::new();\ndoc.insert(\"price\".to_string(), serde_json::json!(18.5));\nlet update_req = UpdateDocumentRequest {\n table: serde_json::json!(\"products\"),\n doc: serde_json::json!(doc),\n id: serde_json::json!(1513686608316989452),\n ..Default::default(),\n};\nlet update_res = index_api.update(update_req).await;\nCODE_BLOCK_75\nres = await indexApi.update({ index: \"test\", id: 1, doc: { cat: 10 } });\nCODE_BLOCK_76\nupdDoc = map[string]interface{} {\"cat\": 10}\nupdRequest = manticoreclient.NewUpdateDocumentRequest(\"test\", updDoc)\nupdRequest.SetId(1)\nres, _, _ = apiClient.IndexAPI.Update(context.Background()).UpdateDocumentRequest(*updRequest).Execute()\nCODE_BLOCK_77\ndelete from products where price < 10;\nCODE_BLOCK_78\nQuery OK, 1 row affected (0.00 sec)\nCODE_BLOCK_79\nPOST /delete\n{\n \"table\": \"products\",\n \"query\":\n {\n \"range\":\n {\n \"price\":\n {\n \"lte\": 10\n }\n }\n }\n}\nCODE_BLOCK_80\n{\n \"table\": \"products\",\n \"deleted\": 1\n}\nCODE_BLOCK_81\n$result = $index->deleteDocuments(new \\Manticoresearch\\Query\\Range('price',['lte'=>10]));\n\nCODE_BLOCK_82\nArray\n(\n [_index] => products\n [deleted] => 1\n)",
- "translations": {
- "chinese": "}};\nsearchRequest.setHighlight(highlight);\nsearchResponse = searchApi.search(searchRequest);\nCODE_BLOCK_55\nclass SearchResponse {\n took: 84\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\n\n\nCODE_BLOCK_56\nobject query = new { query_string=\"@title remove hair\" };\nvar searchRequest = new SearchRequest(\"products\", query);\nvar highlight = new Highlight();\nhighlight.Fieldnames = new List<string> {\"title\"};\nsearchRequest.Highlight = highlight;\nsearchResponse = searchApi.Search(searchRequest);\nCODE_BLOCK_57\nclass SearchResponse {\n took: 103\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\nCODE_BLOCK_58\nlet query = SearchQuery {\n query_string: Some(serde_json::json!(\"@title remove hair\").into()),\n ..Default::default()\n};\nlet highlight = Highlight {\n fields: Some(serde_json::json!([\"title\"]).into()),\n ..Default::default()\n};\nlet search_req = SearchRequest {\n table: \"products\".to_string(),\n query: Some(Box::new(query)),\n highlight: Some(Box::new(highlight)),\n ..Default::default(),\n};\nlet search_res = search_api.search(search_req).await;\nCODE_BLOCK_59\nclass SearchResponse {\n took: 103\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\nCODE_BLOCK_60\nres = await searchApi.search({\n index: 'test',\n query: { query_string: {'text 1'} },\n highlight: {'fields': ['content'] }\n});\nCODE_BLOCK_61\n{\n \"hits\":\n {\n \"hits\":\n [{\n \"_id\": 1,\n \"_score\": 1400,\n \"_source\": {\"content\":\"Text 1\",\"name\":\"Doc 1\",\"cat\":1},\n \"highlight\": {\"content\":[\"<b>Text 1</b>\"]}\n }],\n \"total\": 1\n },\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0\n}\nCODE_BLOCK_62\nsearchRequest := manticoreclient.NewSearchRequest(\"test\")\nquery := map[string]interface{} {\"query_string\": \"text 1\"};\nsearchRequest.SetQuery(query);\n\nhighlightField := manticoreclient.NewHighlightField(\"content\")\nfields := []interface{}{ highlightField }\nhighlight := manticoreclient.NewHighlight()\nhighlight.SetFields(fields)\nsearchRequest.SetHighlight(highlight);\n\nres, _, _ := apiClient.SearchAPI.Search(context.Background()).SearchRequest(*searchRequest).Execute()\nCODE_BLOCK_63\n{\n \"hits\":\n {\n \"hits\":\n [{\n \"_id\": 1,\n \"_score\": 1400,\n \"_source\": {\"content\":\"Text 1\",\"name\":\"Doc 1\",\"cat\":1},\n \"highlight\": {\"content\":[\"<b>Text 1</b>\"]}\n }],\n \"total\": 1\n },\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0\n}\nCODE_BLOCK_64\nupdate products set price=18.5 where id = 1513686608316989452;\nCODE_BLOCK_65\nQuery OK, 1 row affected (0.00 sec)\nCODE_BLOCK_66\nPOST /update\n{\n \"table\": \"products\",\n \"id\": 1513686608316989452,\n \"doc\":\n {\n \"price\": 18.5\n }\n}\nCODE_BLOCK_67\n{\n \"table\": \"products\",\n \"_id\": 1513686608316989452,\n \"result\": \"updated\"\n}\nCODE_BLOCK_68\n$doc = [\n 'body' => [\n 'table' => 'products',\n 'id' => 2,\n 'doc' => [\n 'price' => 18.5\n ]\n ]\n];\n\n$response = $client->update($doc);\nCODE_BLOCK_69\nindexApi = api = manticoresearch.IndexApi(client)\nindexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}})\nCODE_BLOCK_70\nindexApi = api = manticoresearch.IndexApi(client)\nawait indexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}})\nCODE_BLOCK_71\nres = await indexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}});\nCODE_BLOCK_72\nUpdateDocumentRequest updateRequest = new UpdateDocumentRequest();\ndoc = new HashMap<String,Object >(){{\n put(\"price\",18.5);\n}};\nupdateRequest.index(\"products\").id(1513686608316989452L).setDoc(doc);\nindexApi.update(updateRequest);\nCODE_BLOCK_73\nDictionary<string, Object> doc = new Dictionary<string, Object>();\ndoc.Add(\"price\", 18.5);\nUpdateDocumentRequest updateDocumentRequest = new UpdateDocumentRequest(index: \"products\", id: 1513686608316989452L, doc: doc);\nindexApi.Update(updateDocumentRequest);\nCODE_BLOCK_74\nlet mut doc = HashMap::new();\ndoc.insert(\"price\".to_string(), serde_json::json!(18.5));\nlet update_req = UpdateDocumentRequest {\n table: serde_json::json!(\"products\"),\n doc: serde_json::json!(doc),\n id: serde_json::json!(1513686608316989452),\n ..Default::default(),\n};\nlet update_res = index_api.update(update_req).await;\nCODE_BLOCK_75\nres = await indexApi.update({ index: \"test\", id: 1, doc: { cat: 10 } });\nCODE_BLOCK_76\nupdDoc = map[string]interface{} {\"cat\": 10}\nupdRequest = manticoreclient.NewUpdateDocumentRequest(\"test\", updDoc)\nupdRequest.SetId(1)\nres, _, _ = apiClient.IndexAPI.Update(context.Background()).UpdateDocumentRequest(*updRequest).Execute()\nCODE_BLOCK_77\ndelete from products where price < 10;\nCODE_BLOCK_78\nQuery OK, 1 row affected (0.00 sec)\nCODE_BLOCK_79\nPOST /delete\n{\n \"table\": \"products\",\n \"query\":\n {\n \"range\":\n {\n \"price\":\n {\n \"lte\": 10\n }\n }\n }\n}\nCODE_BLOCK_80\n{\n \"table\": \"products\",\n \"deleted\": 1\n}\nCODE_BLOCK_81\n$result = $index->deleteDocuments(new \\Manticoresearch\\Query\\Range('price',['lte'=>10]));\n\nCODE_BLOCK_82\nArray\n(\n [_index] => products\n [deleted] => 1\n)",
- "russian": "}};\nsearchRequest.setHighlight(highlight);\nsearchResponse = searchApi.search(searchRequest);\nCODE_BLOCK_55\nclass SearchResponse {\n took: 84\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\n\n\nCODE_BLOCK_56\nobject query = new { query_string=\"@title remove hair\" };\nvar searchRequest = new SearchRequest(\"products\", query);\nvar highlight = new Highlight();\nhighlight.Fieldnames = new List<string> {\"title\"};\nsearchRequest.Highlight = highlight;\nsearchResponse = searchApi.Search(searchRequest);\nCODE_BLOCK_57\nclass SearchResponse {\n took: 103\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\nCODE_BLOCK_58\nlet query = SearchQuery {\n query_string: Some(serde_json::json!(\"@title remove hair\").into()),\n ..Default::default()\n};\nlet highlight = Highlight {\n fields: Some(serde_json::json!([\"title\"]).into()),\n ..Default::default()\n};\nlet search_req = SearchRequest {\n table: \"products\".to_string(),\n query: Some(Box::new(query)),\n highlight: Some(Box::new(highlight)),\n ..Default::default(),\n};\nlet search_res = search_api.search(search_req).await;\nCODE_BLOCK_59\nclass SearchResponse {\n took: 103\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\nCODE_BLOCK_60\nres = await searchApi.search({\n index: 'test',\n query: { query_string: {'text 1'} },\n highlight: {'fields': ['content'] }\n});\nCODE_BLOCK_61\n{\n \"hits\":\n {\n \"hits\":\n [{\n \"_id\": 1,\n \"_score\": 1400,\n \"_source\": {\"content\":\"Text 1\",\"name\":\"Doc 1\",\"cat\":1},\n \"highlight\": {\"content\":[\"<b>Text 1</b>\"]}\n }],\n \"total\": 1\n },\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0\n}\nCODE_BLOCK_62\nsearchRequest := manticoreclient.NewSearchRequest(\"test\")\nquery := map[string]interface{} {\"query_string\": \"text 1\"};\nsearchRequest.SetQuery(query);\n\nhighlightField := manticoreclient.NewHighlightField(\"content\")\nfields := []interface{}{ highlightField }\nhighlight := manticoreclient.NewHighlight()\nhighlight.SetFields(fields)\nsearchRequest.SetHighlight(highlight);\n\nres, _, _ := apiClient.SearchAPI.Search(context.Background()).SearchRequest(*searchRequest).Execute()\nCODE_BLOCK_63\n{\n \"hits\":\n {\n \"hits\":\n [{\n \"_id\": 1,\n \"_score\": 1400,\n \"_source\": {\"content\":\"Text 1\",\"name\":\"Doc 1\",\"cat\":1},\n \"highlight\": {\"content\":[\"<b>Text 1</b>\"]}\n }],\n \"total\": 1\n },\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0\n}\nCODE_BLOCK_64\nupdate products set price=18.5 where id = 1513686608316989452;\nCODE_BLOCK_65\nQuery OK, 1 row affected (0.00 sec)\nCODE_BLOCK_66\nPOST /update\n{\n \"table\": \"products\",\n \"id\": 1513686608316989452,\n \"doc\":\n {\n \"price\": 18.5\n }\n}\nCODE_BLOCK_67\n{\n \"table\": \"products\",\n \"_id\": 1513686608316989452,\n \"result\": \"updated\"\n}\nCODE_BLOCK_68\n$doc = [\n 'body' => [\n 'table' => 'products',\n 'id' => 2,\n 'doc' => [\n 'price' => 18.5\n ]\n ]\n];\n\n$response = $client->update($doc);\nCODE_BLOCK_69\nindexApi = api = manticoresearch.IndexApi(client)\nindexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}})\nCODE_BLOCK_70\nindexApi = api = manticoresearch.IndexApi(client)\nawait indexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}})\nCODE_BLOCK_71\nres = await indexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}});\nCODE_BLOCK_72\nUpdateDocumentRequest updateRequest = new UpdateDocumentRequest();\ndoc = new HashMap<String,Object >(){{\n put(\"price\",18.5);\n}};\nupdateRequest.index(\"products\").id(1513686608316989452L).setDoc(doc);\nindexApi.update(updateRequest);\nCODE_BLOCK_73\nDictionary<string, Object> doc = new Dictionary<string, Object>();\ndoc.Add(\"price\", 18.5);\nUpdateDocumentRequest updateDocumentRequest = new UpdateDocumentRequest(index: \"products\", id: 1513686608316989452L, doc: doc);\nindexApi.Update(updateDocumentRequest);\nCODE_BLOCK_74\nlet mut doc = HashMap::new();\ndoc.insert(\"price\".to_string(), serde_json::json!(18.5));\nlet update_req = UpdateDocumentRequest {\n table: serde_json::json!(\"products\"),\n doc: serde_json::json!(doc),\n id: serde_json::json!(1513686608316989452),\n ..Default::default(),\n};\nlet update_res = index_api.update(update_req).await;\nCODE_BLOCK_75\nres = await indexApi.update({ index: \"test\", id: 1, doc: { cat: 10 } });\nCODE_BLOCK_76\nupdDoc = map[string]interface{} {\"cat\": 10}\nupdRequest = manticoreclient.NewUpdateDocumentRequest(\"test\", updDoc)\nupdRequest.SetId(1)\nres, _, _ = apiClient.IndexAPI.Update(context.Background()).UpdateDocumentRequest(*updRequest).Execute()\nCODE_BLOCK_77\ndelete from products where price < 10;\nCODE_BLOCK_78\nQuery OK, 1 row affected (0.00 sec)\nCODE_BLOCK_79\nPOST /delete\n{\n \"table\": \"products\",\n \"query\":\n {\n \"range\":\n {\n \"price\":\n {\n \"lte\": 10\n }\n }\n }\n}\nCODE_BLOCK_80\n{\n \"table\": \"products\",\n \"deleted\": 1\n}\nCODE_BLOCK_81\n$result = $index->deleteDocuments(new \\Manticoresearch\\Query\\Range('price',['lte'=>10]));\n\nCODE_BLOCK_82\nArray\n(\n [_index] => products\n [deleted] => 1\n)"
- },
- "is_code_or_comment": false,
- "model": "openai:gpt-4.1-mini",
- "updated_at": 1766339828
- },
- "2e9b9248f9f20d49eaa9181dfa362648948aebabcfccdefe77fc7840a837cb0d": {
- "original": "doc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"Pet Hair Remover Glove\");\ndoc.Add(\"price\",7.99);\ninsertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);\nCODE_BLOCK_39\nlet mut doc1 = HashMap::new();\ndoc1.insert(\"title\".to_string(), serde_json::json!(\"Crossbody Bag with Tassel\"));\ndoc1.insert(\"price\".to_string(), serde_json::json!(19.85));\nlet insert_req1 = InsertDocumentRequest::new(\"products\".to_string(), serde_json::json!(doc1));\nlet insert_res1 = index_api.insert(insert_req1).await;\n\nlet mut doc2 = HashMap::new();\ndoc2.insert(\"title\".to_string(), serde_json::json!(\"microfiber sheet set\"));\ndoc2.insert(\"price\".to_string(), serde_json::json!(19.99));\nlet insert_req2 = InsertDocumentRequest::new(\"products\".to_string(), serde_json::json!(doc2));\nlet insert_res2 = index_api.insert(insert_req2).await;\n\nlet mut doc3 = HashMap::new();\ndoc3.insert(\"title\".to_string(), serde_json::json!(\"Pet Hair Remover Glove\"));\ndoc3.insert(\"price\".to_string(), serde_json::json!(7.99));\nlet insert_req3 = InsertDocumentRequest::new(\"products\".to_string(), serde_json::json!(doc3));\nlet insert_res3 = index_api.insert(insert_req3).await;\nCODE_BLOCK_40\nres = await indexApi.insert({\n index: 'test',\n id: 1,\n doc: { content: 'Text 1', name: 'Doc 1', cat: 1 },\n});\nres = await indexApi.insert({\n index: 'test',\n id: 2,\n doc: { content: 'Text 2', name: 'Doc 2', cat: 2 },\n});\nres = await indexApi.insert({\n index: 'test',\n id: 3,\n doc: { content: 'Text 3', name: 'Doc 3', cat: 7 },\n});\nCODE_BLOCK_41\nindexDoc := map[string]interface{} {\"content\": \"Text 1\", \"name\": \"Doc 1\", \"cat\": 1 }\nindexReq := manticoreclient.NewInsertDocumentRequest(\"products\", indexDoc)\nindexReq.SetId(1)\napiClient.IndexAPI.Insert(context.Background()).InsertDocumentRequest(*indexReq).Execute()\n\nindexDoc = map[string]interface{} {\"content\": \"Text 2\", \"name\": \"Doc 3\", \"cat\": 2 }\nindexReq = manticoreclient.NewInsertDocumentRequest(\"products\", indexDoc)\nindexReq.SetId(2)\napiClient.IndexAPI.Insert(context.Background()).InsertDocumentRequest(*indexReq).Execute()\n\nindexDoc = map[string]interface{} {\"content\": \"Text 3\", \"name\": \"Doc 3\", \"cat\": 7 }\nindexReq = manticoreclient.NewInsertDocumentRequest(\"products\", indexDoc)\nindexReq.SetId(3)\napiClient.IndexAPI.Insert(context.Background()).InsertDocumentRequest(*indexReq).Execute()\nCODE_BLOCK_42\nselect id, highlight(), price from products where match('remove hair');\nCODE_BLOCK_43\n+---------------------+-------------------------------+----------+\n| id | highlight() | price |\n+---------------------+-------------------------------+----------+\n| 1513686608316989452 | Pet <b>Hair Remover</b> Glove | 7.990000 |\n+---------------------+-------------------------------+----------+\n1 row in set (0.00 sec)\nCODE_BLOCK_44\nPOST /search\n{\n \"table\": \"products\",\n \"query\": { \"match\": { \"title\": \"remove hair\" } },\n \"highlight\":\n {\n \"fields\": [\"title\"]\n }\n}\nCODE_BLOCK_45\n{\n \"took\": 0,\n \"timed_out\": false,\n \"hits\": {\n \"total\": 1,\n \"hits\": [\n {\n \"_id\": 1513686608316989452,\n \"_score\": 1680,\n \"_source\": {\n \"price\": 7.99,\n \"title\": \"Pet Hair Remover Glove\"\n },\n \"highlight\": {\n \"title\": [\n \"Pet <b>Hair Remover</b> Glove\"\n ]\n }\n }\n ]\n }\n}\nCODE_BLOCK_46\n$result = $index->search('@title remove hair')->highlight(['title'])->get();\nforeach($result as $doc)\n{\n echo \"Doc ID: \".$doc->getId().\"\\n\";\n echo \"Doc Score: \".$doc->getScore().\"\\n\";\n echo \"Document fields:\\n\";\n print_r($doc->getData());\n echo \"Highlights: \\n\";\n print_r($doc->getHighlight());\n}\nCODE_BLOCK_47\nDoc ID: 1513686608316989452\nDoc Score: 1680\nDocument fields:\nArray\n(\n [price] => 7.99\n [title] => Pet Hair Remover Glove\n)\nHighlights:\nArray\n(\n [title] => Array\n (\n [0] => Pet <b>Hair Remover</b> Glove\n )\n)\n\nCODE_BLOCK_48\nsearchApi.search({\"table\":\"products\",\"query\":{\"query_string\":\"@title remove hair\"},\"highlight\":{\"fields\":[\"title\"]}})\nCODE_BLOCK_49\n{'hits': {'hits': [{u'_id': u'1513686608316989452',\n u'_score': 1680,\n u'_source': {u'title': u'Pet Hair Remover Glove', u'price':7.99},\n u'highlight':{u'title':[u'Pet <b>Hair Remover</b> Glove']}}}],\n 'total': 1},\n 'profile': None,\n 'timed_out': False,\n 'took': 0}\nCODE_BLOCK_50\nawait searchApi.search({\"table\":\"products\",\"query\":{\"query_string\":\"@title remove hair\"},\"highlight\":{\"fields\":[\"title\"]}})\nCODE_BLOCK_51\n{'hits': {'hits': [{u'_id': u'1513686608316989452',\n u'_score': 1680,\n u'_source': {u'title': u'Pet Hair Remover Glove', u'price':7.99},\n u'highlight':{u'title':[u'Pet <b>Hair Remover</b> Glove']}}}],\n 'total': 1},\n 'profile': None,\n 'timed_out': False,\n 'took': 0}\nCODE_BLOCK_52\nres = await searchApi.search({\"table\":\"products\",\"query\":{\"query_string\":\"@title remove hair\"}\"highlight\":{\"fields\":[\"title\"]}});\nCODE_BLOCK_53\n{\"hits\": {\"hits\": [{\"_id\": 1513686608316989452,\n \"_score\": 1680,\n \"_source\": {\"title\": \"Pet Hair Remover Glove\", \"price\":7.99},\n \"highlight\":{\"title\":[\"Pet <b>Hair Remover</b> Glove\"]}}],\n \"total\": 1},\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0}\nCODE_BLOCK_54\n\nquery = new HashMap<String,Object>();\nquery.put(\"query_string\",\"@title remove hair\");\nsearchRequest = new SearchRequest();\nsearchRequest.setIndex(\"forum\");\nsearchRequest.setQuery(query);\nHashMap<String,Object> highlight = new HashMap<String,Object>(){{\n put(\"fields\",new String[] {\"title\"});",
- "translations": {
- "chinese": "doc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"\u5ba0\u7269\u6bdb\u53d1\u53bb\u9664\u624b\u5957\");\ndoc.Add(\"price\",7.99);\ninsertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);\nCODE_BLOCK_39\nlet mut doc1 = HashMap::new();\ndoc1.insert(\"title\".to_string(), serde_json::json!(\"\u5e26\u6d41\u82cf\u7684\u659c\u630e\u5305\"));\ndoc1.insert(\"price\".to_string(), serde_json::json!(19.85));\nlet insert_req1 = InsertDocumentRequest::new(\"products\".to_string(), serde_json::json!(doc1));\nlet insert_res1 = index_api.insert(insert_req1).await;\n\nlet mut doc2 = HashMap::new();\ndoc2.insert(\"title\".to_string(), serde_json::json!(\"\u8d85\u7ec6\u7ea4\u7ef4\u5e8a\u5355\u5957\u88c5\"));\ndoc2.insert(\"price\".to_string(), serde_json::json!(19.99));\nlet insert_req2 = InsertDocumentRequest::new(\"products\".to_string(), serde_json::json!(doc2));\nlet insert_res2 = index_api.insert(insert_req2).await;\n\nlet mut doc3 = HashMap::new();\ndoc3.insert(\"title\".to_string(), serde_json::json!(\"\u5ba0\u7269\u6bdb\u53d1\u53bb\u9664\u624b\u5957\"));\ndoc3.insert(\"price\".to_string(), serde_json::json!(7.99));\nlet insert_req3 = InsertDocumentRequest::new(\"products\".to_string(), serde_json::json!(doc3));\nlet insert_res3 = index_api.insert(insert_req3).await;\nCODE_BLOCK_40\nres = await indexApi.insert({\n index: 'test',\n id: 1,\n doc: { content: '\u6587\u672c 1', name: '\u6587\u6863 1', cat: 1 },\n});\nres = await indexApi.insert({\n index: 'test',\n id: 2,\n doc: { content: '\u6587\u672c 2', name: '\u6587\u6863 2', cat: 2 },\n});\nres = await indexApi.insert({\n index: 'test',\n id: 3,\n doc: { content: '\u6587\u672c 3', name: '\u6587\u6863 3', cat: 7 },\n});\nCODE_BLOCK_41\nindexDoc := map[string]interface{} {\"content\": \"\u6587\u672c 1\", \"name\": \"\u6587\u6863 1\", \"cat\": 1 }\nindexReq := manticoreclient.NewInsertDocumentRequest(\"products\", indexDoc)\nindexReq.SetId(1)\napiClient.IndexAPI.Insert(context.Background()).InsertDocumentRequest(*indexReq).Execute()\n\nindexDoc = map[string]interface{} {\"content\": \"\u6587\u672c 2\", \"name\": \"\u6587\u6863 3\", \"cat\": 2 }\nindexReq = manticoreclient.NewInsertDocumentRequest(\"products\", indexDoc)\nindexReq.SetId(2)\napiClient.IndexAPI.Insert(context.Background()).InsertDocumentRequest(*indexReq).Execute()\n\nindexDoc = map[string]interface{} {\"content\": \"\u6587\u672c 3\", \"name\": \"\u6587\u6863 3\", \"cat\": 7 }\nindexReq = manticoreclient.NewInsertDocumentRequest(\"products\", indexDoc)\nindexReq.SetId(3)\napiClient.IndexAPI.Insert(context.Background()).InsertDocumentRequest(*indexReq).Execute()\nCODE_BLOCK_42\nselect id, highlight(), price from products where match('\u53bb\u9664\u6bdb\u53d1');\nCODE_BLOCK_43\n+---------------------+-------------------------------+----------+\n| id | highlight() | price |\n+---------------------+-------------------------------+----------+\n| 1513686608316989452 | \u5ba0\u7269 <b>\u6bdb\u53d1\u53bb\u9664</b> \u624b\u5957 | 7.990000 |\n+---------------------+-------------------------------+----------+\n1 \u884c\u6570\u636e (0.00 \u79d2)\nCODE_BLOCK_44\nPOST /search\n{\n \"table\": \"products\",\n \"query\": { \"match\": { \"title\": \"\u53bb\u9664\u6bdb\u53d1\" } },\n \"highlight\":\n {\n \"fields\": [\"title\"]\n }\n}\nCODE_BLOCK_45\n{\n \"took\": 0,\n \"timed_out\": false,\n \"hits\": {\n \"total\": 1,\n \"hits\": [\n {\n \"_id\": 1513686608316989452,\n \"_score\": 1680,\n \"_source\": {\n \"price\": 7.99,\n \"title\": \"\u5ba0\u7269\u6bdb\u53d1\u53bb\u9664\u624b\u5957\"\n },\n \"highlight\": {\n \"title\": [\n \"\u5ba0\u7269 <b>\u6bdb\u53d1\u53bb\u9664</b> \u624b\u5957\"\n ]\n }\n }\n ]\n }\n}\nCODE_BLOCK_46\n$result = $index->search('@title \u53bb\u9664\u6bdb\u53d1')->highlight(['title'])->get();\nforeach($result as $doc)\n{\n echo \"\u6587\u6863 ID: \".$doc->getId().\"\\n\";\n echo \"\u6587\u6863\u5f97\u5206: \".$doc->getScore().\"\\n\";\n echo \"\u6587\u6863\u5b57\u6bb5:\\n\";\n print_r($doc->getData());\n echo \"\u9ad8\u4eae\u90e8\u5206: \\n\";\n print_r($doc->getHighlight());\n}\nCODE_BLOCK_47\n\u6587\u6863 ID: 1513686608316989452\n\u6587\u6863\u5f97\u5206: 1680\n\u6587\u6863\u5b57\u6bb5:\nArray\n(\n [price] => 7.99\n [title] => \u5ba0\u7269\u6bdb\u53d1\u53bb\u9664\u624b\u5957\n)\n\u9ad8\u4eae\u90e8\u5206:\nArray\n(\n [title] => Array\n (\n [0] => \u5ba0\u7269 <b>\u6bdb\u53d1\u53bb\u9664</b> \u624b\u5957\n )\n)\n\nCODE_BLOCK_48\nsearchApi.search({\"table\":\"products\",\"query\":{\"query_string\":\"@title \u53bb\u9664\u6bdb\u53d1\"},\"highlight\":{\"fields\":[\"title\"]}})\nCODE_BLOCK_49\n{'hits': {'hits': [{u'_id': u'1513686608316989452',\n u'_score': 1680,\n u'_source': {u'title': u'\u5ba0\u7269\u6bdb\u53d1\u53bb\u9664\u624b\u5957', u'price':7.99},\n u'highlight':{u'title':[u'\u5ba0\u7269 <b>\u6bdb\u53d1\u53bb\u9664</b> \u624b\u5957']}}}],\n 'total': 1},\n 'profile': None,\n 'timed_out': False,\n 'took': 0}\nCODE_BLOCK_50\nawait searchApi.search({\"table\":\"products\",\"query\":{\"query_string\":\"@title \u53bb\u9664\u6bdb\u53d1\"},\"highlight\":{\"fields\":[\"title\"]}})\nCODE_BLOCK_51\n{'hits': {'hits': [{u'_id': u'1513686608316989452',\n u'_score': 1680,\n u'_source': {u'title': u'\u5ba0\u7269\u6bdb\u53d1\u53bb\u9664\u624b\u5957', u'price':7.99},\n u'highlight':{u'title':[u'\u5ba0\u7269 <b>\u6bdb\u53d1\u53bb\u9664</b> \u624b\u5957']}}}],\n 'total': 1},\n 'profile': None,\n 'timed_out': False,\n 'took': 0}\nCODE_BLOCK_52\nres = await searchApi.search({\"table\":\"products\",\"query\":{\"query_string\":\"@title \u53bb\u9664\u6bdb\u53d1\"}\"highlight\":{\"fields\":[\"title\"]}});\nCODE_BLOCK_53\n{\"hits\": {\"hits\": [{\"_id\": 1513686608316989452,\n \"_score\": 1680,\n \"_source\": {\"title\": \"\u5ba0\u7269\u6bdb\u53d1\u53bb\u9664\u624b\u5957\", \"price\":7.99},\n \"highlight\":{\"title\":[\"\u5ba0\u7269 <b>\u6bdb\u53d1\u53bb\u9664</b> \u624b\u5957\"]}}],\n \"total\": 1},\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0}\nCODE_BLOCK_54\n\nquery = new HashMap<String,Object>();\nquery.put(\"query_string\",\"@title \u53bb\u9664\u6bdb\u53d1\");\nsearchRequest = new SearchRequest();\nsearchRequest.setIndex(\"\u8bba\u575b\");\nsearchRequest.setQuery(query);\nHashMap<String,Object> highlight = new HashMap<String,Object>(){{\n put(\"fields\",new String[] {\"title\"});",
- "russian": "doc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"\u041f\u0435\u0440\u0447\u0430\u0442\u043a\u0430 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0448\u0435\u0440\u0441\u0442\u0438 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445\");\ndoc.Add(\"price\",7.99);\ninsertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);\nCODE_BLOCK_39\nlet mut doc1 = HashMap::new();\ndoc1.insert(\"title\".to_string(), serde_json::json!(\"\u0421\u0443\u043c\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u043b\u0435\u0447\u043e \u0441 \u043a\u0438\u0441\u0442\u043e\u0447\u043a\u043e\u0439\"));\ndoc1.insert(\"price\".to_string(), serde_json::json!(19.85));\nlet insert_req1 = InsertDocumentRequest::new(\"products\".to_string(), serde_json::json!(doc1));\nlet insert_res1 = index_api.insert(insert_req1).await;\n\nlet mut doc2 = HashMap::new();\ndoc2.insert(\"title\".to_string(), serde_json::json!(\"\u043d\u0430\u0431\u043e\u0440 \u0438\u0437 \u043c\u0438\u043a\u0440\u043e\u0444\u0438\u0431\u0440\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u043d\u0435\u0439\"));\ndoc2.insert(\"price\".to_string(), serde_json::json!(19.99));\nlet insert_req2 = InsertDocumentRequest::new(\"products\".to_string(), serde_json::json!(doc2));\nlet insert_res2 = index_api.insert(insert_req2).await;\n\nlet mut doc3 = HashMap::new();\ndoc3.insert(\"title\".to_string(), serde_json::json!(\"\u041f\u0435\u0440\u0447\u0430\u0442\u043a\u0430 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0448\u0435\u0440\u0441\u0442\u0438 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445\"));\ndoc3.insert(\"price\".to_string(), serde_json::json!(7.99));\nlet insert_req3 = InsertDocumentRequest::new(\"products\".to_string(), serde_json::json!(doc3));\nlet insert_res3 = index_api.insert(insert_req3).await;\nCODE_BLOCK_40\nres = await indexApi.insert({\n index: 'test',\n id: 1,\n doc: { content: 'Text 1', name: 'Doc 1', cat: 1 },\n});\nres = await indexApi.insert({\n index: 'test',\n id: 2,\n doc: { content: 'Text 2', name: 'Doc 2', cat: 2 },\n});\nres = await indexApi.insert({\n index: 'test',\n id: 3,\n doc: { content: 'Text 3', name: 'Doc 3', cat: 7 },\n});\nCODE_BLOCK_41\nindexDoc := map[string]interface{} {\"content\": \"Text 1\", \"name\": \"Doc 1\", \"cat\": 1 }\nindexReq := manticoreclient.NewInsertDocumentRequest(\"products\", indexDoc)\nindexReq.SetId(1)\napiClient.IndexAPI.Insert(context.Background()).InsertDocumentRequest(*indexReq).Execute()\n\nindexDoc = map[string]interface{} {\"content\": \"Text 2\", \"name\": \"Doc 3\", \"cat\": 2 }\nindexReq = manticoreclient.NewInsertDocumentRequest(\"products\", indexDoc)\nindexReq.SetId(2)\napiClient.IndexAPI.Insert(context.Background()).InsertDocumentRequest(*indexReq).Execute()\n\nindexDoc = map[string]interface{} {\"content\": \"Text 3\", \"name\": \"Doc 3\", \"cat\": 7 }\nindexReq = manticoreclient.NewInsertDocumentRequest(\"products\", indexDoc)\nindexReq.SetId(3)\napiClient.IndexAPI.Insert(context.Background()).InsertDocumentRequest(*indexReq).Execute()\nCODE_BLOCK_42\nselect id, highlight(), price from products where match('remove hair');\nCODE_BLOCK_43\n+---------------------+-------------------------------+----------+\n| id | highlight() | price |\n+---------------------+-------------------------------+----------+\n| 1513686608316989452 | \u041f\u0435\u0440\u0447\u0430\u0442\u043a\u0430 \u0434\u043b\u044f <b>\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0448\u0435\u0440\u0441\u0442\u0438</b> \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445 | 7.990000 |\n+---------------------+-------------------------------+----------+\n1 row in set (0.00 sec)\nCODE_BLOCK_44\nPOST /search\n{\n \"table\": \"products\",\n \"query\": { \"match\": { \"title\": \"remove hair\" } },\n \"highlight\":\n {\n \"fields\": [\"title\"]\n }\n}\nCODE_BLOCK_45\n{\n \"took\": 0,\n \"timed_out\": false,\n \"hits\": {\n \"total\": 1,\n \"hits\": [\n {\n \"_id\": 1513686608316989452,\n \"_score\": 1680,\n \"_source\": {\n \"price\": 7.99,\n \"title\": \"\u041f\u0435\u0440\u0447\u0430\u0442\u043a\u0430 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0448\u0435\u0440\u0441\u0442\u0438 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445\"\n },\n \"highlight\": {\n \"title\": [\n \"\u041f\u0435\u0440\u0447\u0430\u0442\u043a\u0430 \u0434\u043b\u044f <b>\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0448\u0435\u0440\u0441\u0442\u0438</b> \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445\"\n ]\n }\n }\n ]\n }\n}\nCODE_BLOCK_46\n$result = $index->search('@title remove hair')->highlight(['title'])->get();\nforeach($result as $doc)\n{\n echo \"Doc ID: \".$doc->getId().\"\\n\";\n echo \"Doc Score: \".$doc->getScore().\"\\n\";\n echo \"Document fields:\\n\";\n print_r($doc->getData());\n echo \"Highlights: \\n\";\n print_r($doc->getHighlight());\n}\nCODE_BLOCK_47\nDoc ID: 1513686608316989452\nDoc Score: 1680\nDocument fields:\nArray\n(\n [price] => 7.99\n [title] => \u041f\u0435\u0440\u0447\u0430\u0442\u043a\u0430 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0448\u0435\u0440\u0441\u0442\u0438 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445\n)\nHighlights:\nArray\n(\n [title] => Array\n (\n [0] => \u041f\u0435\u0440\u0447\u0430\u0442\u043a\u0430 \u0434\u043b\u044f <b>\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0448\u0435\u0440\u0441\u0442\u0438</b> \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445\n )\n)\n\nCODE_BLOCK_48\nsearchApi.search({\"table\":\"products\",\"query\":{\"query_string\":\"@title remove hair\"},\"highlight\":{\"fields\":[\"title\"]}})\nCODE_BLOCK_49\n{'hits': {'hits': [{u'_id': u'1513686608316989452',\n u'_score': 1680,\n u'_source': {u'title': u'\u041f\u0435\u0440\u0447\u0430\u0442\u043a\u0430 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0448\u0435\u0440\u0441\u0442\u0438 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445', u'price':7.99},\n u'highlight':{u'title':[u'\u041f\u0435\u0440\u0447\u0430\u0442\u043a\u0430 \u0434\u043b\u044f <b>\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0448\u0435\u0440\u0441\u0442\u0438</b> \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445']}}}],\n 'total': 1},\n 'profile': None,\n 'timed_out': False,\n 'took': 0}\nCODE_BLOCK_50\nawait searchApi.search({\"table\":\"products\",\"query\":{\"query_string\":\"@title remove hair\"},\"highlight\":{\"fields\":[\"title\"]}})\nCODE_BLOCK_51\n{'hits': {'hits': [{u'_id': u'1513686608316989452',\n u'_score': 1680,\n u'_source': {u'title': u'\u041f\u0435\u0440\u0447\u0430\u0442\u043a\u0430 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0448\u0435\u0440\u0441\u0442\u0438 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445', u'price':7.99},\n u'highlight':{u'title':[u'\u041f\u0435\u0440\u0447\u0430\u0442\u043a\u0430 \u0434\u043b\u044f <b>\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0448\u0435\u0440\u0441\u0442\u0438</b> \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445']}}}],\n 'total': 1},\n 'profile': None,\n 'timed_out': False,\n 'took': 0}\nCODE_BLOCK_52\nres = await searchApi.search({\"table\":\"products\",\"query\":{\"query_string\":\"@title remove hair\"}\"highlight\":{\"fields\":[\"title\"]}});\nCODE_BLOCK_53\n{\"hits\": {\"hits\": [{\"_id\": 1513686608316989452,\n \"_score\": 1680,\n \"_source\": {\"title\": \"\u041f\u0435\u0440\u0447\u0430\u0442\u043a\u0430 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0448\u0435\u0440\u0441\u0442\u0438 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445\", \"price\":7.99},\n \"highlight\":{\"title\":[\"\u041f\u0435\u0440\u0447\u0430\u0442\u043a\u0430 \u0434\u043b\u044f <b>\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0448\u0435\u0440\u0441\u0442\u0438</b> \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445\"]}}],\n \"total\": 1},\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0}\nCODE_BLOCK_54\n\nquery = new HashMap<String,Object>();\nquery.put(\"query_string\",\"@title remove hair\");\nsearchRequest = new SearchRequest();\nsearchRequest.setIndex(\"forum\");\nsearchRequest.setQuery(query);\nHashMap<String,Object> highlight = new HashMap<String,Object>(){{\n put(\"fields\",new String[] {\"title\"});"
- },
- "is_code_or_comment": false,
- "model": "qwen/qwen3-14b",
- "updated_at": 1766411728
- },
- "07f4f99234815e705202d8b56f78272b90a0dcc1c20cfc89b9e3a0069df2af98": {
- "original": "async fn maticore_connect {\n\tlet configuration = Configuration {\n\t base_path: \"http://127.0.0.1:9308\".to_owned(),\n\t ..Default::default(),\n\t};\n let api_config = Arc::new(configuration);\n let utils_api = UtilsApiClient::new(api_config.clone());\n let index_api = IndexApiClient::new(api_config.clone());\n let search_api = SearchApiClient::new(api_config.clone());\nCODE_BLOCK_14\nimport {\n Configuration,\n IndexApi,\n SearchApi,\n UtilsApi\n} from \"manticoresearch-ts\";\n...\nconst config = new Configuration({\n basePath: 'http://localhost:9308',\n})\nconst indexApi = new IndexApi(config);\nconst searchApi = new SearchApi(config);\nconst utilsApi = new UtilsApi(config);\nCODE_BLOCK_15\nimport (\n\t\"context\"\n\tmanticoreclient \"github.com/manticoresoftware/manticoresearch-go\"\n)\n...\nconfiguration := manticoreclient.NewConfiguration()\nconfiguration.Servers[0].URL = \"http://localhost:9308\"\napiClient := manticoreclient.NewAPIClient(configuration)\nCODE_BLOCK_16\ncreate table products(title text, price float) morphology='stem_en';\nCODE_BLOCK_17\nQuery OK, 0 rows affected (0.02 sec)\nCODE_BLOCK_18\nPOST /cli -d \"create table products(title text, price float) morphology='stem_en'\"\nCODE_BLOCK_19\n{\n\"total\":0,\n\"error\":\"\",\n\"warning\":\"\"\n}\nCODE_BLOCK_20\n$index = new \\Manticoresearch\\Index($client);\n$index->setName('products');\n$index->create([\n 'title'=>['type'=>'text'],\n 'price'=>['type'=>'float'],\n],['morphology' => 'stem_en']);\nCODE_BLOCK_21\nutilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'')\nCODE_BLOCK_22\nawait utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'')\nCODE_BLOCK_23\nres = await utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'');\nCODE_BLOCK_24\nutilsApi.sql(\"create table products(title text, price float) morphology='stem_en'\", true);\nCODE_BLOCK_25\nutilsApi.Sql(\"create table products(title text, price float) morphology='stem_en'\", true);\nCODE_BLOCK_26\nutils_api.sql(\"create table products(title text, price float) morphology='stem_en'\", Some(true)).await;\nCODE_BLOCK_27\nres = await utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'');\nCODE_BLOCK_28\nres := apiClient.UtilsAPI.Sql(context.Background()).Body(\"create table products(title text, price float) morphology='stem_en'\").Execute();\nCODE_BLOCK_29\ninsert into products(title,price) values ('Crossbody Bag with Tassel', 19.85), ('microfiber sheet set', 19.99), ('Pet Hair Remover Glove', 7.99);\nCODE_BLOCK_30\nQuery OK, 3 rows affected (0.01 sec)\nCODE_BLOCK_31\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"Crossbody Bag with Tassel\",\n \"price\" : 19.85\n }\n}\n\n\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"microfiber sheet set\",\n \"price\" : 19.99\n }\n}\n\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"Pet Hair Remover Glove\",\n \"price\" : 7.99\n }\n}\nCODE_BLOCK_32\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\n\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\n\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\nCODE_BLOCK_33\n$index->addDocuments([\n ['title' => 'Crossbody Bag with Tassel', 'price' => 19.85],\n ['title' => 'microfiber sheet set', 'price' => 19.99],\n ['title' => 'Pet Hair Remover Glove', 'price' => 7.99]\n]);\nCODE_BLOCK_34\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}})\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}})\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}})\nCODE_BLOCK_35\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}})\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}})\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}})\nCODE_BLOCK_36\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}});\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}});\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}});\nCODE_BLOCK_37\nInsertDocumentRequest newdoc = new InsertDocumentRequest();\nHashMap<String,Object> doc = new HashMap<String,Object>(){{\n put(\"title\",\"Crossbody Bag with Tassel\");\n put(\"price\",19.85);\n}};\nnewdoc.index(\"products\").setDoc(doc);\nsqlresult = indexApi.insert(newdoc);\n\nnewdoc = new InsertDocumentRequest();\ndoc = new HashMap<String,Object>(){{\n put(\"title\",\"microfiber sheet set\");\n put(\"price\",19.99);\n}};\nnewdoc.index(\"products\").setDoc(doc);\nsqlresult = indexApi.insert(newdoc);\n\nnewdoc = new InsertDocumentRequest();\ndoc = new HashMap<String,Object>(){{\n put(\"title\",\"Pet Hair Remover Glove\");\n put(\"price\",7.99);\n }};\nnewdoc.index(\"products\").setDoc(doc);\nindexApi.insert(newdoc);\nCODE_BLOCK_38\nDictionary<string, Object> doc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"Crossbody Bag with Tassel\");\ndoc.Add(\"price\",19.85);\nInsertDocumentRequest insertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);\n\ndoc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"microfiber sheet set\");\ndoc.Add(\"price\",19.99);\ninsertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);",
- "translations": {
- "chinese": "async fn maticore_connect {\n\tlet configuration = Configuration {\n\t base_path: \"http://127.0.0.1:9308\".to_owned(),\n\t ..Default::default(),\n\t};\n let api_config = Arc::new(configuration);\n let utils_api = UtilsApiClient::new(api_config.clone());\n let index_api = IndexApiClient::new(api_config.clone());\n let search_api = SearchApiClient::new(api_config.clone());\nCODE_BLOCK_14\nimport {\n Configuration,\n IndexApi,\n SearchApi,\n UtilsApi\n} from \"manticoresearch-ts\";\n...\nconst config = new Configuration({\n basePath: 'http://localhost:9308',\n})\nconst indexApi = new IndexApi(config);\nconst searchApi = new SearchApi(config);\nconst utilsApi = new UtilsApi(config);\nCODE_BLOCK_15\nimport (\n\t\"context\"\n\tmanticoreclient \"github.com/manticoresoftware/manticoresearch-go\"\n)\n...\nconfiguration := manticoreclient.NewConfiguration()\nconfiguration.Servers[0].URL = \"http://localhost:9308\"\napiClient := manticoreclient.NewAPIClient(configuration)\nCODE_BLOCK_16\ncreate table products(title text, price float) morphology='stem_en';\nCODE_BLOCK_17\nQuery OK, 0 rows affected (0.02 sec)\nCODE_BLOCK_18\nPOST /cli -d \"create table products(title text, price float) morphology='stem_en'\"\nCODE_BLOCK_19\n{\n\"total\":0,\n\"error\":\"\",\n\"warning\":\"\"\n}\nCODE_BLOCK_20\n$index = new \\Manticoresearch\\Index($client);\n$index->setName('products');\n$index->create([\n 'title'=>['type'=>'text'],\n 'price'=>['type'=>'float'],\n],['morphology' => 'stem_en']);\nCODE_BLOCK_21\nutilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'')\nCODE_BLOCK_22\nawait utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'')\nCODE_BLOCK_23\nres = await utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'');\nCODE_BLOCK_24\nutilsApi.sql(\"create table products(title text, price float) morphology='stem_en'\", true);\nCODE_BLOCK_25\nutilsApi.Sql(\"create table products(title text, price float) morphology='stem_en'\", true);\nCODE_BLOCK_26\nutils_api.sql(\"create table products(title text, price float) morphology='stem_en'\", Some(true)).await;\nCODE_BLOCK_27\nres = await utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'');\nCODE_BLOCK_28\nres := apiClient.UtilsAPI.Sql(context.Background()).Body(\"create table products(title text, price float) morphology='stem_en'\").Execute();\nCODE_BLOCK_29\ninsert into products(title,price) values ('Crossbody Bag with Tassel', 19.85), ('microfiber sheet set', 19.99), ('Pet Hair Remover Glove', 7.99);\nCODE_BLOCK_30\nQuery OK, 3 rows affected (0.01 sec)\nCODE_BLOCK_31\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"Crossbody Bag with Tassel\",\n \"price\" : 19.85\n }\n}\n\n\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"microfiber sheet set\",\n \"price\" : 19.99\n }\n}\n\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"Pet Hair Remover Glove\",\n \"price\" : 7.99\n }\n}\nCODE_BLOCK_32\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\n\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\n\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\nCODE_BLOCK_33\n$index->addDocuments([\n ['title' => 'Crossbody Bag with Tassel', 'price' => 19.85],\n ['title' => 'microfiber sheet set', 'price' => 19.99],\n ['title' => 'Pet Hair Remover Glove', 'price' => 7.99]\n]);\nCODE_BLOCK_34\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}})\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}})\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}})\nCODE_BLOCK_35\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}})\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}})\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}})\nCODE_BLOCK_36\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}});\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}});\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}});\nCODE_BLOCK_37\nInsertDocumentRequest newdoc = new InsertDocumentRequest();\nHashMap<String,Object> doc = new HashMap<String,Object>(){{\n put(\"title\",\"Crossbody Bag with Tassel\");\n put(\"price\",19.85);\n}};\nnewdoc.index(\"products\").setDoc(doc);\nsqlresult = indexApi.insert(newdoc);\n\nnewdoc = new InsertDocumentRequest();\ndoc = new HashMap<String,Object>(){{\n put(\"title\",\"microfiber sheet set\");\n put(\"price\",19.99);\n}};\nnewdoc.index(\"products\").setDoc(doc);\nsqlresult = indexApi.insert(newdoc);\n\nnewdoc = new InsertDocumentRequest();\ndoc = new HashMap<String,Object>(){{\n put(\"title\",\"Pet Hair Remover Glove\");\n put(\"price\",7.99);\n }};\nnewdoc.index(\"products\").setDoc(doc);\nindexApi.insert(newdoc);\nCODE_BLOCK_38\nDictionary<string, Object> doc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"Crossbody Bag with Tassel\");\ndoc.Add(\"price\",19.85);\nInsertDocumentRequest insertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);\n\ndoc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"microfiber sheet set\");\ndoc.Add(\"price\",19.99);\ninsertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);",
- "russian": "async fn maticore_connect {\n\tlet configuration = Configuration {\n\t base_path: \"http://127.0.0.1:9308\".to_owned(),\n\t ..Default::default(),\n\t};\n let api_config = Arc::new(configuration);\n let utils_api = UtilsApiClient::new(api_config.clone());\n let index_api = IndexApiClient::new(api_config.clone());\n let search_api = SearchApiClient::new(api_config.clone());\nCODE_BLOCK_14\nimport {\n Configuration,\n IndexApi,\n SearchApi,\n UtilsApi\n} from \"manticoresearch-ts\";\n...\nconst config = new Configuration({\n basePath: 'http://localhost:9308',\n})\nconst indexApi = new IndexApi(config);\nconst searchApi = new SearchApi(config);\nconst utilsApi = new UtilsApi(config);\nCODE_BLOCK_15\nimport (\n\t\"context\"\n\tmanticoreclient \"github.com/manticoresoftware/manticoresearch-go\"\n)\n...\nconfiguration := manticoreclient.NewConfiguration()\nconfiguration.Servers[0].URL = \"http://localhost:9308\"\napiClient := manticoreclient.NewAPIClient(configuration)\nCODE_BLOCK_16\ncreate table products(title text, price float) morphology='stem_en';\nCODE_BLOCK_17\nQuery OK, 0 rows affected (0.02 sec)\nCODE_BLOCK_18\nPOST /cli -d \"create table products(title text, price float) morphology='stem_en'\"\nCODE_BLOCK_19\n{\n\"total\":0,\n\"error\":\"\",\n\"warning\":\"\"\n}\nCODE_BLOCK_20\n$index = new \\Manticoresearch\\Index($client);\n$index->setName('products');\n$index->create([\n 'title'=>['type'=>'text'],\n 'price'=>['type'=>'float'],\n],['morphology' => 'stem_en']);\nCODE_BLOCK_21\nutilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'')\nCODE_BLOCK_22\nawait utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'')\nCODE_BLOCK_23\nres = await utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'');\nCODE_BLOCK_24\nutilsApi.sql(\"create table products(title text, price float) morphology='stem_en'\", true);\nCODE_BLOCK_25\nutilsApi.Sql(\"create table products(title text, price float) morphology='stem_en'\", true);\nCODE_BLOCK_26\nutils_api.sql(\"create table products(title text, price float) morphology='stem_en'\", Some(true)).await;\nCODE_BLOCK_27\nres = await utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'');\nCODE_BLOCK_28\nres := apiClient.UtilsAPI.Sql(context.Background()).Body(\"create table products(title text, price float) morphology='stem_en'\").Execute();\nCODE_BLOCK_29\ninsert into products(title,price) values ('Crossbody Bag with Tassel', 19.85), ('microfiber sheet set', 19.99), ('Pet Hair Remover Glove', 7.99);\nCODE_BLOCK_30\nQuery OK, 3 rows affected (0.01 sec)\nCODE_BLOCK_31\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"Crossbody Bag with Tassel\",\n \"price\" : 19.85\n }\n}\n\n\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"microfiber sheet set\",\n \"price\" : 19.99\n }\n}\n\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"Pet Hair Remover Glove\",\n \"price\" : 7.99\n }\n}\nCODE_BLOCK_32\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\n\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\n\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\nCODE_BLOCK_33\n$index->addDocuments([\n ['title' => 'Crossbody Bag with Tassel', 'price' => 19.85],\n ['title' => 'microfiber sheet set', 'price' => 19.99],\n ['title' => 'Pet Hair Remover Glove', 'price' => 7.99]\n]);\nCODE_BLOCK_34\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}})\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}})\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}})\nCODE_BLOCK_35\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}})\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}})\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}})\nCODE_BLOCK_36\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}});\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}});\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}});\nCODE_BLOCK_37\nInsertDocumentRequest newdoc = new InsertDocumentRequest();\nHashMap<String,Object> doc = new HashMap<String,Object>(){{\n put(\"title\",\"Crossbody Bag with Tassel\");\n put(\"price\",19.85);\n}};\nnewdoc.index(\"products\").setDoc(doc);\nsqlresult = indexApi.insert(newdoc);\n\nnewdoc = new InsertDocumentRequest();\ndoc = new HashMap<String,Object>(){{\n put(\"title\",\"microfiber sheet set\");\n put(\"price\",19.99);\n}};\nnewdoc.index(\"products\").setDoc(doc);\nsqlresult = indexApi.insert(newdoc);\n\nnewdoc = new InsertDocumentRequest();\ndoc = new HashMap<String,Object>(){{\n put(\"title\",\"Pet Hair Remover Glove\");\n put(\"price\",7.99);\n }};\nnewdoc.index(\"products\").setDoc(doc);\nindexApi.insert(newdoc);\nCODE_BLOCK_38\nDictionary<string, Object> doc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"Crossbody Bag with Tassel\");\ndoc.Add(\"price\",19.85);\nInsertDocumentRequest insertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);\n\ndoc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"microfiber sheet set\");\ndoc.Add(\"price\",19.99);\ninsertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);"
- },
- "is_code_or_comment": false,
- "model": "openai:gpt-4.1-mini",
- "updated_at": 1766339828
- },
- "5ffd7bdc18c8ad4ff851621cc7b68a182548470b24a629870139b88c7dfbf188": {
- "original": "async fn maticore_connect {\n\tlet configuration = Configuration {\n\t base_path: \"http://127.0.0.1:9308\".to_owned(),\n\t ..Default::default(),\n\t};\n let api_config = Arc::new(configuration);\n let utils_api = UtilsApiClient::new(api_config.clone());\n let index_api = IndexApiClient::new(api_config.clone());\n let search_api = SearchApiClient::new(api_config.clone());\nCODE_BLOCK_14\nimport {\n Configuration,\n IndexApi,\n SearchApi,\n UtilsApi\n} from \"manticoresearch-ts\";\n...\nconst config = new Configuration({\n basePath: 'http://localhost:9308',\n})\nconst indexApi = new IndexApi(config);\nconst searchApi = new SearchApi(config);\nconst utilsApi = new UtilsApi(config);\nCODE_BLOCK_15\nimport (\n\t\"context\"\n\tmanticoreclient \"github.com/manticoresoftware/manticoresearch-go\"\n)\n...\nconfiguration := manticoreclient.NewConfiguration()\nconfiguration.Servers[0].URL = \"http://localhost:9308\"\napiClient := manticoreclient.NewAPIClient(configuration)\nCODE_BLOCK_16\ncreate table products(title text, price float) morphology='stem_en';\nCODE_BLOCK_17\nQuery OK, 0 rows affected (0.02 sec)\nCODE_BLOCK_18\nPOST /cli -d \"create table products(title text, price float) morphology='stem_en'\"\nCODE_BLOCK_19\n{\n\"total\":0,\n\"error\":\"\",\n\"warning\":\"\"\n}\nCODE_BLOCK_20\n$index = new \\Manticoresearch\\Index($client);\n$index->setName('products');\n$index->create([\n 'title'=>['type'=>'text'],\n 'price'=>['type'=>'float'],\n],['morphology' => 'stem_en']);\nCODE_BLOCK_21\nutilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'')\nCODE_BLOCK_22\nawait utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'')\nCODE_BLOCK_23\nres = await utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'');\nCODE_BLOCK_24\nutilsApi.sql(\"create table products(title text, price float) morphology='stem_en'\", true);\nCODE_BLOCK_25\nutilsApi.Sql(\"create table products(title text, price float) morphology='stem_en'\", true);\nCODE_BLOCK_26\nutils_api.sql(\"create table products(title text, price float) morphology='stem_en'\", Some(true)).await;\nCODE_BLOCK_27\nres = await utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'');\nCODE_BLOCK_28\nres := apiClient.UtilsAPI.Sql(context.Background()).Body(\"create table products(title text, price float) morphology='stem_en'\").Execute();\nCODE_BLOCK_29\ninsert into products(title,price) values ('Crossbody Bag with Tassel', 19.85), ('microfiber sheet set', 19.99), ('Pet Hair Remover Glove', 7.99);\nCODE_BLOCK_30\nQuery OK, 3 rows affected (0.01 sec)\nCODE_BLOCK_31\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"Crossbody Bag with Tassel\",\n \"price\" : 19.85\n }\n}\n\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"microfiber sheet set\",\n \"price\" : 19.99\n }\n}\n\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"Pet Hair Remover Glove\",\n \"price\" : 7.99\n }\n}\nCODE_BLOCK_32\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\n\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\n\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\nCODE_BLOCK_33\n$index->addDocuments([\n ['title' => 'Crossbody Bag with Tassel', 'price' => 19.85],\n ['title' => 'microfiber sheet set', 'price' => 19.99],\n ['title' => 'Pet Hair Remover Glove', 'price' => 7.99]\n]);\nCODE_BLOCK_34\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}})\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}})\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}})\nCODE_BLOCK_35\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}})\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}})\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}})\nCODE_BLOCK_36\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}});\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}});\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}});\nCODE_BLOCK_37\nInsertDocumentRequest newdoc = new InsertDocumentRequest();\nHashMap<String,Object> doc = new HashMap<String,Object>(){{\n put(\"title\",\"Crossbody Bag with Tassel\");\n put(\"price\",19.85);\n}};\nnewdoc.index(\"products\").setDoc(doc);\nsqlresult = indexApi.insert(newdoc);\n\nnewdoc = new InsertDocumentRequest();\ndoc = new HashMap<String,Object>(){{\n put(\"title\",\"microfiber sheet set\");\n put(\"price\",19.99);\n}};\nnewdoc.index(\"products\").setDoc(doc);\nsqlresult = indexApi.insert(newdoc);\n\nnewdoc = new InsertDocumentRequest();\ndoc = new HashMap<String,Object>(){{\n put(\"title\",\"Pet Hair Remover Glove\");\n put(\"price\",7.99);\n }};\nnewdoc.index(\"products\").setDoc(doc);\nindexApi.insert(newdoc);\nCODE_BLOCK_38\nDictionary<string, Object> doc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"Crossbody Bag with Tassel\");\ndoc.Add(\"price\",19.85);\nInsertDocumentRequest insertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);\n\ndoc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"microfiber sheet set\");\ndoc.Add(\"price\",19.99);\ninsertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);",
- "translations": {
- "chinese": "async fn maticore_connect {\n\tlet configuration = Configuration {\n\t base_path: \"http://127.0.0.1:9308\".to_owned(),\n\t ..Default::default(),\n\t};\n let api_config = Arc::new(configuration);\n let utils_api = UtilsApiClient::new(api_config.clone());\n let index_api = IndexApiClient::new(api_config.clone());\n let search_api = SearchApiClient::new(api_config.clone());\nCODE_BLOCK_14\nimport {\n Configuration,\n IndexApi,\n SearchApi,\n UtilsApi\n} from \"manticoresearch-ts\";\n...\nconst config = new Configuration({\n basePath: 'http://localhost:9308',\n})\nconst indexApi = new IndexApi(config);\nconst searchApi = new SearchApi(config);\nconst utilsApi = new UtilsApi(config);\nCODE_BLOCK_15\nimport (\n\t\"context\"\n\tmanticoreclient \"github.com/manticoresoftware/manticoresearch-go\"\n)\n...\nconfiguration := manticoreclient.NewConfiguration()\nconfiguration.Servers[0].URL = \"http://localhost:9308\"\napiClient := manticoreclient.NewAPIClient(configuration)\nCODE_BLOCK_16\ncreate table products(title text, price float) morphology='stem_en';\nCODE_BLOCK_17\nQuery OK, 0 rows affected (0.02 sec)\nCODE_BLOCK_18\nPOST /cli -d \"create table products(title text, price float) morphology='stem_en'\"\nCODE_BLOCK_19\n{\n\"total\":0,\n\"error\":\"\",\n\"warning\":\"\"\n}\nCODE_BLOCK_20\n$index = new \\Manticoresearch\\Index($client);\n$index->setName('products');\n$index->create([\n 'title'=>['type'=>'text'],\n 'price'=>['type'=>'float'],\n],['morphology' => 'stem_en']);\nCODE_BLOCK_21\nutilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'')\nCODE_BLOCK_22\nawait utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'')\nCODE_BLOCK_23\nres = await utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'');\nCODE_BLOCK_24\nutilsApi.sql(\"create table products(title text, price float) morphology='stem_en'\", true);\nCODE_BLOCK_25\nutilsApi.Sql(\"create table products(title text, price float) morphology='stem_en'\", true);\nCODE_BLOCK_26\nutils_api.sql(\"create table products(title text, price float) morphology='stem_en'\", Some(true)).await;\nCODE_BLOCK_27\nres = await utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'');\nCODE_BLOCK_28\nres := apiClient.UtilsAPI.Sql(context.Background()).Body(\"create table products(title text, price float) morphology='stem_en'\").Execute();\nCODE_BLOCK_29\ninsert into products(title,price) values ('Crossbody Bag with Tassel', 19.85), ('microfiber sheet set', 19.99), ('Pet Hair Remover Glove', 7.99);\nCODE_BLOCK_30\nQuery OK, 3 rows affected (0.01 sec)\nCODE_BLOCK_31\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"Crossbody Bag with Tassel\",\n \"price\" : 19.85\n }\n}\n\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"microfiber sheet set\",\n \"price\" : 19.99\n }\n}\n\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"Pet Hair Remover Glove\",\n \"price\" : 7.99\n }\n}\nCODE_BLOCK_32\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\n\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\n\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\nCODE_BLOCK_33\n$index->addDocuments([\n ['title' => 'Crossbody Bag with Tassel', 'price' => 19.85],\n ['title' => 'microfiber sheet set', 'price' => 19.99],\n ['title' => 'Pet Hair Remover Glove', 'price' => 7.99]\n]);\nCODE_BLOCK_34\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}})\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}})\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}})\nCODE_BLOCK_35\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}})\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}})\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}})\nCODE_BLOCK_36\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}});\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}});\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}});\nCODE_BLOCK_37\nInsertDocumentRequest newdoc = new InsertDocumentRequest();\nHashMap<String,Object> doc = new HashMap<String,Object>(){{\n put(\"title\",\"Crossbody Bag with Tassel\");\n put(\"price\",19.85);\n}};\nnewdoc.index(\"products\").setDoc(doc);\nsqlresult = indexApi.insert(newdoc);\n\nnewdoc = new InsertDocumentRequest();\ndoc = new HashMap<String,Object>(){{\n put(\"title\",\"microfiber sheet set\");\n put(\"price\",19.99);\n}};\nnewdoc.index(\"products\").setDoc(doc);\nsqlresult = indexApi.insert(newdoc);\n\nnewdoc = new InsertDocumentRequest();\ndoc = new HashMap<String,Object>(){{\n put(\"title\",\"Pet Hair Remover Glove\");\n put(\"price\",7.99);\n }};\nnewdoc.index(\"products\").setDoc(doc);\nindexApi.insert(newdoc);\nCODE_BLOCK_38\nDictionary<string, Object> doc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"Crossbody Bag with Tassel\");\ndoc.Add(\"price\",19.85);\nInsertDocumentRequest insertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);\n\ndoc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"microfiber sheet set\");\ndoc.Add(\"price\",19.99);\ninsertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);",
- "russian": "async fn maticore_connect {\n\tlet configuration = Configuration {\n\t base_path: \"http://127.0.0.1:9308\".to_owned(),\n\t ..Default::default(),\n\t};\n let api_config = Arc::new(configuration);\n let utils_api = UtilsApiClient::new(api_config.clone());\n let index_api = IndexApiClient::new(api_config.clone());\n let search_api = SearchApiClient::new(api_config.clone());\nCODE_BLOCK_14\nimport {\n Configuration,\n IndexApi,\n SearchApi,\n UtilsApi\n} from \"manticoresearch-ts\";\n...\nconst config = new Configuration({\n basePath: 'http://localhost:9308',\n})\nconst indexApi = new IndexApi(config);\nconst searchApi = new SearchApi(config);\nconst utilsApi = new UtilsApi(config);\nCODE_BLOCK_15\nimport (\n\t\"context\"\n\tmanticoreclient \"github.com/manticoresoftware/manticoresearch-go\"\n)\n...\nconfiguration := manticoreclient.NewConfiguration()\nconfiguration.Servers[0].URL = \"http://localhost:9308\"\napiClient := manticoreclient.NewAPIClient(configuration)\nCODE_BLOCK_16\ncreate table products(title text, price float) morphology='stem_en';\nCODE_BLOCK_17\nQuery OK, 0 rows affected (0.02 sec)\nCODE_BLOCK_18\nPOST /cli -d \"create table products(title text, price float) morphology='stem_en'\"\nCODE_BLOCK_19\n{\n\"total\":0,\n\"error\":\"\",\n\"warning\":\"\"\n}\nCODE_BLOCK_20\n$index = new \\Manticoresearch\\Index($client);\n$index->setName('products');\n$index->create([\n 'title'=>['type'=>'text'],\n 'price'=>['type'=>'float'],\n],['morphology' => 'stem_en']);\nCODE_BLOCK_21\nutilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'')\nCODE_BLOCK_22\nawait utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'')\nCODE_BLOCK_23\nres = await utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'');\nCODE_BLOCK_24\nutilsApi.sql(\"create table products(title text, price float) morphology='stem_en'\", true);\nCODE_BLOCK_25\nutilsApi.Sql(\"create table products(title text, price float) morphology='stem_en'\", true);\nCODE_BLOCK_26\nutils_api.sql(\"create table products(title text, price float) morphology='stem_en'\", Some(true)).await;\nCODE_BLOCK_27\nres = await utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'');\nCODE_BLOCK_28\nres := apiClient.UtilsAPI.Sql(context.Background()).Body(\"create table products(title text, price float) morphology='stem_en'\").Execute();\nCODE_BLOCK_29\ninsert into products(title,price) values ('Crossbody Bag with Tassel', 19.85), ('microfiber sheet set', 19.99), ('Pet Hair Remover Glove', 7.99);\nCODE_BLOCK_30\nQuery OK, 3 rows affected (0.01 sec)\nCODE_BLOCK_31\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"Crossbody Bag with Tassel\",\n \"price\" : 19.85\n }\n}\n\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"microfiber sheet set\",\n \"price\" : 19.99\n }\n}\n\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"Pet Hair Remover Glove\",\n \"price\" : 7.99\n }\n}\nCODE_BLOCK_32\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\n\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\n\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\nCODE_BLOCK_33\n$index->addDocuments([\n ['title' => 'Crossbody Bag with Tassel', 'price' => 19.85],\n ['title' => 'microfiber sheet set', 'price' => 19.99],\n ['title' => 'Pet Hair Remover Glove', 'price' => 7.99]\n]);\nCODE_BLOCK_34\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}})\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}})\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}})\nCODE_BLOCK_35\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}})\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}})\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}})\nCODE_BLOCK_36\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}});\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}});\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}});\nCODE_BLOCK_37\nInsertDocumentRequest newdoc = new InsertDocumentRequest();\nHashMap<String,Object> doc = new HashMap<String,Object>(){{\n put(\"title\",\"Crossbody Bag with Tassel\");\n put(\"price\",19.85);\n}};\nnewdoc.index(\"products\").setDoc(doc);\nsqlresult = indexApi.insert(newdoc);\n\nnewdoc = new InsertDocumentRequest();\ndoc = new HashMap<String,Object>(){{\n put(\"title\",\"microfiber sheet set\");\n put(\"price\",19.99);\n}};\nnewdoc.index(\"products\").setDoc(doc);\nsqlresult = indexApi.insert(newdoc);\n\nnewdoc = new InsertDocumentRequest();\ndoc = new HashMap<String,Object>(){{\n put(\"title\",\"Pet Hair Remover Glove\");\n put(\"price\",7.99);\n }};\nnewdoc.index(\"products\").setDoc(doc);\nindexApi.insert(newdoc);\nCODE_BLOCK_38\nDictionary<string, Object> doc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"Crossbody Bag with Tassel\");\ndoc.Add(\"price\",19.85);\nInsertDocumentRequest insertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);\n\ndoc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"microfiber sheet set\");\ndoc.Add(\"price\",19.99);\ninsertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);"
- },
- "is_code_or_comment": false,
- "model": "deepseek/deepseek-v3.2",
- "updated_at": 1766374308
- },
- "6d00d6f0b0c608cf9179e1a52a20e02d35c5fd95a8ef05eb3487aca301a998e2": {
- "original": "}};\nsearchRequest.setHighlight(highlight);\nsearchResponse = searchApi.search(searchRequest);\nCODE_BLOCK_55\nclass SearchResponse {\n took: 84\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\n\nCODE_BLOCK_56\nobject query = new { query_string=\"@title remove hair\" };\nvar searchRequest = new SearchRequest(\"products\", query);\nvar highlight = new Highlight();\nhighlight.Fieldnames = new List<string> {\"title\"};\nsearchRequest.Highlight = highlight;\nsearchResponse = searchApi.Search(searchRequest);\nCODE_BLOCK_57\nclass SearchResponse {\n took: 103\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\nCODE_BLOCK_58\nlet query = SearchQuery {\n query_string: Some(serde_json::json!(\"@title remove hair\").into()),\n ..Default::default()\n};\nlet highlight = Highlight {\n fields: Some(serde_json::json!([\"title\"]).into()),\n ..Default::default()\n};\nlet search_req = SearchRequest {\n table: \"products\".to_string(),\n query: Some(Box::new(query)),\n highlight: Some(Box::new(highlight)),\n ..Default::default(),\n};\nlet search_res = search_api.search(search_req).await;\nCODE_BLOCK_59\nclass SearchResponse {\n took: 103\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\nCODE_BLOCK_60\nres = await searchApi.search({\n index: 'test',\n query: { query_string: {'text 1'} },\n highlight: {'fields': ['content'] }\n});\nCODE_BLOCK_61\n{\n \"hits\":\n {\n \"hits\":\n [{\n \"_id\": 1,\n \"_score\": 1400,\n \"_source\": {\"content\":\"Text 1\",\"name\":\"Doc 1\",\"cat\":1},\n \"highlight\": {\"content\":[\"<b>Text 1</b>\"]}\n }],\n \"total\": 1\n },\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0\n}\nCODE_BLOCK_62\nsearchRequest := manticoreclient.NewSearchRequest(\"test\")\nquery := map[string]interface{} {\"query_string\": \"text 1\"};\nsearchRequest.SetQuery(query);\n\nhighlightField := manticoreclient.NewHighlightField(\"content\")\nfields := []interface{}{ highlightField }\nhighlight := manticoreclient.NewHighlight()\nhighlight.SetFields(fields)\nsearchRequest.SetHighlight(highlight);\n\nres, _, _ := apiClient.SearchAPI.Search(context.Background()).SearchRequest(*searchRequest).Execute()\nCODE_BLOCK_63\n{\n \"hits\":\n {\n \"hits\":\n [{\n \"_id\": 1,\n \"_score\": 1400,\n \"_source\": {\"content\":\"Text 1\",\"name\":\"Doc 1\",\"cat\":1},\n \"highlight\": {\"content\":[\"<b>Text 1</b>\"]}\n }],\n \"total\": 1\n },\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0\n}\nCODE_BLOCK_64\nupdate products set price=18.5 where id = 1513686608316989452;\nCODE_BLOCK_65\nQuery OK, 1 row affected (0.00 sec)\nCODE_BLOCK_66\nPOST /update\n{\n \"table\": \"products\",\n \"id\": 1513686608316989452,\n \"doc\":\n {\n \"price\": 18.5\n }\n}\nCODE_BLOCK_67\n{\n \"table\": \"products\",\n \"_id\": 1513686608316989452,\n \"result\": \"updated\"\n}\nCODE_BLOCK_68\n$doc = [\n 'body' => [\n 'table' => 'products',\n 'id' => 2,\n 'doc' => [\n 'price' => 18.5\n ]\n ]\n];\n\n$response = $client->update($doc);\nCODE_BLOCK_69\nindexApi = api = manticoresearch.IndexApi(client)\nindexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}})\nCODE_BLOCK_70\nindexApi = api = manticoresearch.IndexApi(client)\nawait indexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}})\nCODE_BLOCK_71\nres = await indexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}});\nCODE_BLOCK_72\nUpdateDocumentRequest updateRequest = new UpdateDocumentRequest();\ndoc = new HashMap<String,Object >(){{\n put(\"price\",18.5);\n}};\nupdateRequest.index(\"products\").id(1513686608316989452L).setDoc(doc);\nindexApi.update(updateRequest);\nCODE_BLOCK_73\nDictionary<string, Object> doc = new Dictionary<string, Object>();\ndoc.Add(\"price\", 18.5);\nUpdateDocumentRequest updateDocumentRequest = new UpdateDocumentRequest(index: \"products\", id: 1513686608316989452L, doc: doc);\nindexApi.Update(updateDocumentRequest);\nCODE_BLOCK_74\nlet mut doc = HashMap::new();\ndoc.insert(\"price\".to_string(), serde_json::json!(18.5));\nlet update_req = UpdateDocumentRequest {\n table: serde_json::json!(\"products\"),\n doc: serde_json::json!(doc),\n id: serde_json::json!(1513686608316989452),\n ..Default::default(),\n};\nlet update_res = index_api.update(update_req).await;\nCODE_BLOCK_75\nres = await indexApi.update({ index: \"test\", id: 1, doc: { cat: 10 } });\nCODE_BLOCK_76\nupdDoc = map[string]interface{} {\"cat\": 10}\nupdRequest = manticoreclient.NewUpdateDocumentRequest(\"test\", updDoc)\nupdRequest.SetId(1)\nres, _, _ = apiClient.IndexAPI.Update(context.Background()).UpdateDocumentRequest(*updRequest).Execute()\nCODE_BLOCK_77\ndelete from products where price < 10;\nCODE_BLOCK_78\nQuery OK, 1 row affected (0.00 sec)\nCODE_BLOCK_79\nPOST /delete\n{\n \"table\": \"products\",\n \"query\":\n {\n \"range\":\n {\n \"price\":\n {\n \"lte\": 10\n }\n }\n }\n}\nCODE_BLOCK_80\n{\n \"table\": \"products\",\n \"deleted\": 1\n}\nCODE_BLOCK_81\n$result = $index->deleteDocuments(new \\Manticoresearch\\Query\\Range('price',['lte'=>10]));\n\nCODE_BLOCK_82\nArray\n(\n [_index] => products\n [deleted] => 1\n)",
- "translations": {
- "chinese": "}};\nsearchRequest.setHighlight(highlight);\nsearchResponse = searchApi.search(searchRequest);\nCODE_BLOCK_55\nclass SearchResponse {\n took: 84\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\n\nCODE_BLOCK_56\nobject query = new { query_string=\"@title remove hair\" };\nvar searchRequest = new SearchRequest(\"products\", query);\nvar highlight = new Highlight();\nhighlight.Fieldnames = new List<string> {\"title\"};\nsearchRequest.Highlight = highlight;\nsearchResponse = searchApi.Search(searchRequest);\nCODE_BLOCK_57\nclass SearchResponse {\n took: 103\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\n\nCODE_BLOCK_58\nlet query = SearchQuery {\n query_string: Some(serde_json::json!(\"@title remove hair\").into()),\n ..Default::default()\n};\nlet highlight = Highlight {\n fields: Some(serde_json::json!([\"title\"]).into()),\n ..Default::default()\n};\nlet search_req = SearchRequest {\n table: \"products\".to_string(),\n query: Some(Box::new(query)),\n highlight: Some(Box::new(highlight)),\n ..Default::default(),\n};\nlet search_res = search_api.search(search_req).await;\nCODE_BLOCK_59\nclass SearchResponse {\n took: 103\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\n\nCODE_BLOCK_60\nres = await searchApi.search({\n index: 'test',\n query: { query_string: {'text 1'} },\n highlight: {'fields': ['content'] }\n});\nCODE_BLOCK_61\n{\n \"hits\":\n {\n \"hits\":\n [{\n \"_id\": 1,\n \"_score\": 1400,\n \"_source\": {\"content\":\"Text 1\",\"name\":\"Doc 1\",\"cat\":1},\n \"highlight\": {\"content\":[\"<b>Text 1</b>\"]}\n }],\n \"total\": 1\n },\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0\n}\nCODE_BLOCK_62\nsearchRequest := manticoreclient.NewSearchRequest(\"test\")\nquery := map[string]interface{} {\"query_string\": \"text 1\"};\nsearchRequest.SetQuery(query);\n\nhighlightField := manticoreclient.NewHighlightField(\"content\")\nfields := []interface{}{ highlightField }\nhighlight := manticoreclient.NewHighlight()\nhighlight.SetFields(fields)\nsearchRequest.SetHighlight(highlight);\n\nres, _, _ := apiClient.SearchAPI.Search(context.Background()).SearchRequest(*searchRequest).Execute()\nCODE_BLOCK_63\n{\n \"hits\":\n {\n \"hits\":\n [{\n \"_id\": 1,\n \"_score\": 1400,\n \"_source\": {\"content\":\"Text 1\",\"name\":\"Doc 1\",\"cat\":1},\n \"highlight\": {\"content\":[\"<b>Text 1</b>\"]}\n }],\n \"total\": 1\n },\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0\n}\nCODE_BLOCK_64\nupdate products set price=18.5 where id = 1513686608316989452;\nCODE_BLOCK_65\nQuery OK, 1 row affected (0.00 sec)\nCODE_BLOCK_66\nPOST /update\n{\n \"table\": \"products\",\n \"id\": 1513686608316989452,\n \"doc\":\n {\n \"price\": 18.5\n }\n}\nCODE_BLOCK_67\n{\n \"table\": \"products\",\n \"_id\": 1513686608316989452,\n \"result\": \"updated\"\n}\nCODE_BLOCK_68\n$doc = [\n 'body' => [\n 'table' => 'products',\n 'id' => 2,\n 'doc' => [\n 'price' => 18.5\n ]\n ]\n];\n\n$response = $client->update($doc);\nCODE_BLOCK_69\nindexApi = api = manticoresearch.IndexApi(client)\nindexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}})\nCODE_BLOCK_70\nindexApi = api = manticoresearch.IndexApi(client)\nawait indexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}})\nCODE_BLOCK_71\nres = await indexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}});\nCODE_BLOCK_72\nUpdateDocumentRequest updateRequest = new UpdateDocumentRequest();\ndoc = new HashMap<String,Object >(){{\n put(\"price\",18.5);\n}};\nupdateRequest.index(\"products\").id(1513686608316989452L).setDoc(doc);\nindexApi.update(updateRequest);\nCODE_BLOCK_73\nDictionary<string, Object> doc = new Dictionary<string, Object>();\ndoc.Add(\"price\", 18.5);\nUpdateDocumentRequest updateDocumentRequest = new UpdateDocumentRequest(index: \"products\", id: 1513686608316989452L, doc: doc);\nindexApi.Update(updateDocumentRequest);\nCODE_BLOCK_74\nlet mut doc = HashMap::new();\ndoc.insert(\"price\".to_string(), serde_json::json!(18.5));\nlet update_req = UpdateDocumentRequest {\n table: serde_json::json!(\"products\"),\n doc: serde_json::json!(doc),\n id: serde_json::json!(1513686608316989452),\n ..Default::default(),\n};\nlet update_res = index_api.update(update_req).await;\nCODE_BLOCK_75\nres = await indexApi.update({ index: \"test\", id: 1, doc: { cat: 10 } });\nCODE_BLOCK_76\nupdDoc = map[string]interface{} {\"cat\": 10}\nupdRequest = manticoreclient.NewUpdateDocumentRequest(\"test\", updDoc)\nupdRequest.SetId(1)\nres, _, _ = apiClient.IndexAPI.Update(context.Background()).UpdateDocumentRequest(*updRequest).Execute()\nCODE_BLOCK_77\ndelete from products where price < 10;\nCODE_BLOCK_78\nQuery OK, 1 row affected (0.00 sec)\nCODE_BLOCK_79\nPOST /delete\n{\n \"table\": \"products\",\n \"query\":\n {\n \"range\":\n {\n \"price\":\n {\n \"lte\": 10\n }\n }\n }\n}\nCODE_BLOCK_80\n{\n \"table\": \"products\",\n \"deleted\": 1\n}\nCODE_BLOCK_81\n$result = $index->deleteDocuments(new \\Manticoresearch\\Query\\Range('price',['lte'=>10]));\n\nCODE_BLOCK_82\nArray\n(\n [_index] => products\n [deleted] => 1\n)",
- "russian": "}};\nsearchRequest.setHighlight(highlight);\nsearchResponse = searchApi.search(searchRequest);\nCODE_BLOCK_55\nclass SearchResponse {\n took: 84\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\n\nCODE_BLOCK_56\nobject query = new { query_string=\"@title remove hair\" };\nvar searchRequest = new SearchRequest(\"products\", query);\nvar highlight = new Highlight();\nhighlight.Fieldnames = new List<string> {\"title\"};\nsearchRequest.Highlight = highlight;\nsearchResponse = searchApi.Search(searchRequest);\nCODE_BLOCK_57\nclass SearchResponse {\n took: 103\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\nCODE_BLOCK_58\nlet query = SearchQuery {\n query_string: Some(serde_json::json!(\"@title remove hair\").into()),\n ..Default::default()\n};\nlet highlight = Highlight {\n fields: Some(serde_json::json!([\"title\"]).into()),\n ..Default::default()\n};\nlet search_req = SearchRequest {\n table: \"products\".to_string(),\n query: Some(Box::new(query)),\n highlight: Some(Box::new(highlight)),\n ..Default::default(),\n};\nlet search_res = search_api.search(search_req).await;\nCODE_BLOCK_59\nclass SearchResponse {\n took: 103\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\nCODE_BLOCK_60\nres = await searchApi.search({\n index: 'test',\n query: { query_string: {'text 1'} },\n highlight: {'fields': ['content'] }\n});\nCODE_BLOCK_61\n{\n \"hits\":\n {\n \"hits\":\n [{\n \"_id\": 1,\n \"_score\": 1400,\n \"_source\": {\"content\":\"Text 1\",\"name\":\"Doc 1\",\"cat\":1},\n \"highlight\": {\"content\":[\"<b>Text 1</b>\"]}\n }],\n \"total\": 1\n },\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0\n}\nCODE_BLOCK_62\nsearchRequest := manticoreclient.NewSearchRequest(\"test\")\nquery := map[string]interface{} {\"query_string\": \"text 1\"};\nsearchRequest.SetQuery(query);\n\nhighlightField := manticoreclient.NewHighlightField(\"content\")\nfields := []interface{}{ highlightField }\nhighlight := manticoreclient.NewHighlight()\nhighlight.SetFields(fields)\nsearchRequest.SetHighlight(highlight);\n\nres, _, _ := apiClient.SearchAPI.Search(context.Background()).SearchRequest(*searchRequest).Execute()\nCODE_BLOCK_63\n{\n \"hits\":\n {\n \"hits\":\n [{\n \"_id\": 1,\n \"_score\": 1400,\n \"_source\": {\"content\":\"Text 1\",\"name\":\"Doc 1\",\"cat\":1},\n \"highlight\": {\"content\":[\"<b>Text 1</b>\"]}\n }],\n \"total\": 1\n },\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0\n}\nCODE_BLOCK_64\nupdate products set price=18.5 where id = 1513686608316989452;\nCODE_BLOCK_65\nQuery OK, 1 row affected (0.00 sec)\nCODE_BLOCK_66\nPOST /update\n{\n \"table\": \"products\",\n \"id\": 1513686608316989452,\n \"doc\":\n {\n \"price\": 18.5\n }\n}\nCODE_BLOCK_67\n{\n \"table\": \"products\",\n \"_id\": 1513686608316989452,\n \"result\": \"updated\"\n}\nCODE_BLOCK_68\n$doc = [\n 'body' => [\n 'table' => 'products',\n 'id' => 2,\n 'doc' => [\n 'price' => 18.5\n ]\n ]\n];\n\n$response = $client->update($doc);\nCODE_BLOCK_69\nindexApi = api = manticoresearch.IndexApi(client)\nindexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}})\nCODE_BLOCK_70\nindexApi = api = manticoresearch.IndexApi(client)\nawait indexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}})\nCODE_BLOCK_71\nres = await indexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}});\nCODE_BLOCK_72\nUpdateDocumentRequest updateRequest = new UpdateDocumentRequest();\ndoc = new HashMap<String,Object >(){{\n put(\"price\",18.5);\n}};\nupdateRequest.index(\"products\").id(1513686608316989452L).setDoc(doc);\nindexApi.update(updateRequest);\nCODE_BLOCK_73\nDictionary<string, Object> doc = new Dictionary<string, Object>();\ndoc.Add(\"price\", 18.5);\nUpdateDocumentRequest updateDocumentRequest = new UpdateDocumentRequest(index: \"products\", id: 1513686608316989452L, doc: doc);\nindexApi.Update(updateDocumentRequest);\nCODE_BLOCK_74\nlet mut doc = HashMap::new();\ndoc.insert(\"price\".to_string(), serde_json::json!(18.5));\nlet update_req = UpdateDocumentRequest {\n table: serde_json::json!(\"products\"),\n doc: serde_json::json!(doc),\n id: serde_json::json!(1513686608316989452),\n ..Default::default(),\n};\nlet update_res = index_api.update(update_req).await;\nCODE_BLOCK_75\nres = await indexApi.update({ index: \"test\", id: 1, doc: { cat: 10 } });\nCODE_BLOCK_76\nupdDoc = map[string]interface{} {\"cat\": 10}\nupdRequest = manticoreclient.NewUpdateDocumentRequest(\"test\", updDoc)\nupdRequest.SetId(1)\nres, _, _ = apiClient.IndexAPI.Update(context.Background()).UpdateDocumentRequest(*updRequest).Execute()\nCODE_BLOCK_77\ndelete from products where price < 10;\nCODE_BLOCK_78\nQuery OK, 1 row affected (0.00 sec)\nCODE_BLOCK_79\nPOST /delete\n{\n \"table\": \"products\",\n \"query\":\n {\n \"range\":\n {\n \"price\":\n {\n \"lte\": 10\n }\n }\n }\n}\nCODE_BLOCK_80\n{\n \"table\": \"products\",\n \"deleted\": 1\n}\nCODE_BLOCK_81\n$result = $index->deleteDocuments(new \\Manticoresearch\\Query\\Range('price',['lte'=>10]));\n\nCODE_BLOCK_82\nArray\n(\n [_index] => products\n [deleted] => 1\n)"
- },
- "is_code_or_comment": false,
- "model": "deepseek/deepseek-v3.2",
- "updated_at": 1766374308
- },
- "0db985e0da96d3924c5c222cef00d1630725e58d6bb0ea559e77c109896c8da7": {
- "original": "<!-- request Rust -->\n\nCODE_BLOCK_40\n\n<!-- intro -->\n##### TypeScript:\n\n<!-- request TypeScript -->\n\nCODE_BLOCK_41\n\n<!-- intro -->\n##### Go:\n\n<!-- request Go -->\n\nCODE_BLOCK_42\n\n<!-- end -->\n\nMore details on the subject can be found here:\n* [Adding data to a plain table](https://play.manticoresearch.com/mysql/)\n* [Adding data to a RealTime table](https://play.manticoresearch.com/rtintro/)\n\n<!-- example search -->\n## Search\n\nLet's find one of the documents. The query we will use is 'remove hair'. As you can see, it finds a document with the title 'Pet Hair Remover Glove' and highlights 'Hair remover' in it, even though the query has \"remove\", not \"remover\". This is because when we created the table, we turned on using English stemming (`morphology \"stem_en\"`).\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\nCODE_BLOCK_43\n<!-- response SQL -->\n\nCODE_BLOCK_44\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n\nCODE_BLOCK_45\n<!-- response JSON -->\n\nCODE_BLOCK_46\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\nCODE_BLOCK_47\n<!-- response PHP -->\n\nCODE_BLOCK_48\n`\n\n<!-- intro -->\nPython\n<!-- request Python -->\n\nCODE_BLOCK_49\n<!-- response Python -->\nCODE_BLOCK_50\n\n<!-- intro -->\nPython-asyncio\n<!-- request Python-asyncio -->\n\nCODE_BLOCK_51\n<!-- response Python-asyncio -->\nCODE_BLOCK_52\n\n<!-- intro -->\njavascript\n<!-- request javascript -->\n\nCODE_BLOCK_53\n<!-- response javascript -->\nCODE_BLOCK_54\n\n<!-- intro -->\njava\n<!-- request Java -->\n\nCODE_BLOCK_55\n<!-- response Java -->\nCODE_BLOCK_56\n\n<!-- intro -->\nC#\n<!-- request C# -->\n\nCODE_BLOCK_57\n<!-- response C# -->\nCODE_BLOCK_58\n\n<!-- intro -->\nRust\n<!-- request Rust -->\n\nCODE_BLOCK_59\n<!-- response Rust -->\nCODE_BLOCK_60\n\n<!-- intro -->\nTypeScript\n<!-- request TypeScript -->\n\nCODE_BLOCK_61\n<!-- response typescript -->\nCODE_BLOCK_62\n\n<!-- intro -->\nGo\n<!-- request Go -->\n\nCODE_BLOCK_63\n<!-- response Go -->\nCODE_BLOCK_64\n<!-- end -->\n\nMore information on different search options available in Manticore can be found in our learning courses:\n* [Faceted search](https://play.manticoresearch.com/faceting/)\n* [Geo search](https://play.manticoresearch.com/geosearch/)\n* [Searching for similar documents](https://play.manticoresearch.com/mlt/)\n\n<!-- example update -->\n## Update\n\nLet's assume we now want to update the document - change the price to 18.5. This can be done by filtering by any field, but normally you know the document id and update something based on that.\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\nCODE_BLOCK_65\n<!-- response SQL -->\n\nCODE_BLOCK_66\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n\nCODE_BLOCK_67\n\n<!-- response JSON -->\n\nCODE_BLOCK_68\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\nCODE_BLOCK_69\n\n<!-- intro -->\n##### Python:\n\n<!-- request Python -->\nCODE_BLOCK_70\n\n<!-- intro -->\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\nCODE_BLOCK_71\n\n<!-- intro -->\n##### Javascript:\n\n<!-- request javascript -->\nCODE_BLOCK_72\n\n<!-- intro -->\n##### java:\n\n<!-- request Java -->\nCODE_BLOCK_73\n\n<!-- intro -->\n##### C#:\n\n<!-- request C# -->\nCODE_BLOCK_74\n\n<!-- intro -->\n##### Rust:\n\n<!-- request Rust -->\nCODE_BLOCK_75\n\n<!-- intro -->\n##### TypeScript:\n\n<!-- request TypeScript -->\nCODE_BLOCK_76\n\n<!-- intro -->\n##### Go:\n\n<!-- request Go -->\nCODE_BLOCK_77\n\n<!-- end -->\n\n<!-- example delete -->\n## Delete\n\nLet's now delete all documents with price lower than 10.\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\nCODE_BLOCK_78\n<!-- response SQL -->\n\nCODE_BLOCK_79\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n\nCODE_BLOCK_80\n\n<!-- response JSON -->\n\nCODE_BLOCK_81\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\nCODE_BLOCK_82\n<!-- response PHP -->\n\nCODE_BLOCK_83\n<!-- intro -->\n\n##### Python:\n\n<!-- request Python -->\nCODE_BLOCK_84\n\n<!-- intro -->\n\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\nCODE_BLOCK_85\n\n<!-- intro -->\n\n##### Javascript:\n\n<!-- request javascript -->\nCODE_BLOCK_86\n\n<!-- intro -->\n\n##### java:\n\n<!-- request Java -->\nCODE_BLOCK_87\n\n<!-- intro -->\n\n##### C#:\n\n<!-- request C# -->\nCODE_BLOCK_88\n\n<!-- intro -->\n\n##### Rust:\n\n<!-- request Rust -->\nCODE_BLOCK_89\n\n<!-- intro -->\n\n##### TypeScript:\n\n<!-- request TypeScript -->\nCODE_BLOCK_90\n\n<!-- intro -->\n\n##### Go:\n\n<!-- request Go -->\nCODE_BLOCK_91\n\n<!-- end -->\n<!-- proofread -->\n\n",
- "translations": {
- "chinese": "<!-- request Rust -->\n\nCODE_BLOCK_40\n\n<!-- intro -->\n##### TypeScript:\n\n<!-- request TypeScript -->\n\nCODE_BLOCK_41\n\n<!-- intro -->\n##### Go:\n\n<!-- request Go -->\n\nCODE_BLOCK_42\n\n<!-- end -->\n\n\u6709\u5173\u6b64\u4e3b\u9898\u7684\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\u53ef\u4ee5\u5728\u6b64\u5904\u627e\u5230\uff1a\n* [\u5c06\u6570\u636e\u6dfb\u52a0\u5230\u666e\u901a\u8868](https://play.manticoresearch.com/mysql/)\n* [\u5c06\u6570\u636e\u6dfb\u52a0\u5230\u5b9e\u65f6\u8868](https://play.manticoresearch.com/rtintro/)\n\n<!-- example search -->\n## \u641c\u7d22\n\n\u8ba9\u6211\u4eec\u67e5\u627e\u5176\u4e2d\u4e00\u4e2a\u6587\u6863\u3002\u6211\u4eec\u5c06\u4f7f\u7528\u7684\u67e5\u8be2\u662f\u201cremove hair\u201d\u3002\u5982\u60a8\u6240\u89c1\uff0c\u5b83\u627e\u5230\u4e86\u4e00\u4e2a\u6807\u9898\u4e3a\u201cPet Hair Remover Glove\u201d\u7684\u6587\u6863\uff0c\u5e76\u5728\u5176\u4e2d\u7a81\u51fa\u663e\u793a\u4e86\u201cHair remover\u201d\uff0c\u5373\u4f7f\u67e5\u8be2\u4e2d\u4f7f\u7528\u7684\u662f\u201cremove\u201d\u800c\u4e0d\u662f\u201cremover\u201d\u3002\u8fd9\u662f\u56e0\u4e3a\u5f53\u6211\u4eec\u521b\u5efa\u8868\u65f6\uff0c\u6211\u4eec\u542f\u7528\u4e86\u82f1\u8bed\u8bcd\u5e72\u63d0\u53d6\uff08`morphology \"stem_en\"`\uff09\u3002\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\nCODE_BLOCK_43\n<!-- response SQL -->\n\nCODE_BLOCK_44\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n\nCODE_BLOCK_45\n<!-- response JSON -->\n\nCODE_BLOCK_46\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\nCODE_BLOCK_47\n<!-- response PHP -->\n\nCODE_BLOCK_48\n`\n\n<!-- intro -->\nPython\n<!-- request Python -->\n\nCODE_BLOCK_49\n<!-- response Python -->\nCODE_BLOCK_50\n\n<!-- intro -->\nPython-asyncio\n<!-- request Python-asyncio -->\n\nCODE_BLOCK_51\n<!-- response Python-asyncio -->\nCODE_BLOCK_52\n\n<!-- intro -->\njavascript\n<!-- request javascript -->\n\nCODE_BLOCK_53\n<!-- response javascript -->\nCODE_BLOCK_54\n\n<!-- intro -->\njava\n<!-- request Java -->\n\nCODE_BLOCK_55\n<!-- response Java -->\nCODE_BLOCK_56\n\n<!-- intro -->\nC#\n<!-- request C# -->\n\nCODE_BLOCK_57\n<!-- response C# -->\nCODE_BLOCK_58\n\n<!-- intro -->\nRust\n<!-- request Rust -->\n\nCODE_BLOCK_59\n<!-- response Rust -->\nCODE_BLOCK_60\n\n<!-- intro -->\nTypeScript\n<!-- request TypeScript -->\n\nCODE_BLOCK_61\n<!-- response typescript -->\nCODE_BLOCK_62\n\n<!-- intro -->\nGo\n<!-- request Go -->\n\nCODE_BLOCK_63\n<!-- response Go -->\nCODE_BLOCK_64\n<!-- end -->\n\n\u6709\u5173Manticore\u4e2d\u53ef\u7528\u7684\u4e0d\u540c\u641c\u7d22\u9009\u9879\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u53ef\u4ee5\u5728\u6211\u4eec\u7684\u5b66\u4e60\u8bfe\u7a0b\u4e2d\u627e\u5230\uff1a\n* [\u9762\u5411\u641c\u7d22](https://play.manticoresearch.com/faceting/)\n* [\u5730\u7406\u641c\u7d22](https://play.manticoresearch.com/geosearch/)\n* [\u641c\u7d22\u7c7b\u4f3c\u6587\u6863](https://play.manticoresearch.com/mlt/)\n\n<!-- example update -->\n## \u66f4\u65b0\n\n\u5047\u8bbe\u6211\u4eec\u73b0\u5728\u60f3\u8981\u66f4\u65b0\u6587\u6863 - \u5c06\u4ef7\u683c\u66f4\u6539\u4e3a18.5\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u6309\u4efb\u4f55\u5b57\u6bb5\u8fdb\u884c\u8fc7\u6ee4\u6765\u5b8c\u6210\uff0c\u4f46\u901a\u5e38\u60a8\u77e5\u9053\u6587\u6863id\u5e76\u57fa\u4e8e\u6b64\u8fdb\u884c\u66f4\u65b0\u3002\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\nCODE_BLOCK_65\n<!-- response SQL -->\n\nCODE_BLOCK_66\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n\nCODE_BLOCK_67\n\n<!-- response JSON -->\n\nCODE_BLOCK_68\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\nCODE_BLOCK_69\n\n<!-- intro -->\n##### Python:\n\n<!-- request Python -->\nCODE_BLOCK_70\n\n<!-- intro -->\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\nCODE_BLOCK_71\n\n<!-- intro -->\n##### Javascript:\n\n<!-- request javascript -->\nCODE_BLOCK_72\n\n<!-- intro -->\n##### java:\n\n<!-- request Java -->\nCODE_BLOCK_73\n\n<!-- intro -->\n##### C#:\n\n<!-- request C# -->\nCODE_BLOCK_74\n\n<!-- intro -->\n##### Rust:\n\n<!-- request Rust -->\nCODE_BLOCK_75\n\n<!-- intro -->\n##### TypeScript:\n\n<!-- request TypeScript -->\nCODE_BLOCK_76\n\n<!-- intro -->\n##### Go:\n\n<!-- request Go -->\nCODE_BLOCK_77\n\n<!-- end -->\n\n<!-- example delete -->\n## \u5220\u9664\n\n\u73b0\u5728\u8ba9\u6211\u4eec\u5220\u9664\u6240\u6709\u4ef7\u683c\u4f4e\u4e8e10\u7684\u6587\u6863\u3002\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\nCODE_BLOCK_78\n<!-- response SQL -->\n\nCODE_BLOCK_79\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n\nCODE_BLOCK_80\n\n<!-- response JSON -->\n\nCODE_BLOCK_81\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\nCODE_BLOCK_82\n<!-- response PHP -->\n\nCODE_BLOCK_83\n<!-- intro -->\n\n##### Python:\n\n<!-- request Python -->\nCODE_BLOCK_84\n\n<!-- intro -->\n\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\nCODE_BLOCK_85\n\n<!-- intro -->\n\n##### Javascript:\n\n<!-- request javascript -->\nCODE_BLOCK_86\n\n<!-- intro -->\n\n##### java:\n\n<!-- request Java -->\nCODE_BLOCK_87\n\n<!-- intro -->\n\n##### C#:\n\n<!-- request C# -->\nCODE_BLOCK_88\n\n<!-- intro -->\n\n##### Rust:\n\n<!-- request Rust -->\nCODE_BLOCK_89\n\n<!-- intro -->\n\n##### TypeScript:\n\n<!-- request TypeScript -->\nCODE_BLOCK_90\n\n<!-- intro -->\n\n##### Go:\n\n<!-- request Go -->\nCODE_BLOCK_91\n\n<!-- end -->\n<!-- proofread -->\n\n",
- "russian": "<!-- request Rust -->\n\nCODE_BLOCK_40\n\n<!-- intro -->\n##### TypeScript:\n\n<!-- request TypeScript -->\n\nCODE_BLOCK_41\n\n<!-- intro -->\n##### Go:\n\n<!-- request Go -->\n\nCODE_BLOCK_42\n\n<!-- end -->\n\n\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u0442\u0435\u043c\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0437\u0434\u0435\u0441\u044c:\n* [\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443](https://play.manticoresearch.com/mysql/)\n* [\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 RealTime \u0442\u0430\u0431\u043b\u0438\u0446\u0443](https://play.manticoresearch.com/rtintro/)\n\n<!-- example search -->\n## \u041f\u043e\u0438\u0441\u043a\n\n\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0439\u0434\u0435\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0417\u0430\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u2014 'remove hair'. \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c 'Pet Hair Remover Glove' \u0438 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u0432 \u043d\u0435\u043c 'Hair remover', \u0434\u0430\u0436\u0435 \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \"remove\", \u0430 \u043d\u0435 \"remover\". \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043c\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0439 \u0441\u0442\u0435\u043c\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 (`morphology \"stem_en\"`).\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\nCODE_BLOCK_43\n<!-- response SQL -->\n\nCODE_BLOCK_44\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n\nCODE_BLOCK_45\n<!-- response JSON -->\n\nCODE_BLOCK_46\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\nCODE_BLOCK_47\n<!-- response PHP -->\n\nCODE_BLOCK_48\n`\n\n<!-- intro -->\nPython\n<!-- request Python -->\n\nCODE_BLOCK_49\n<!-- response Python -->\nCODE_BLOCK_50\n\n<!-- intro -->\nPython-asyncio\n<!-- request Python-asyncio -->\n\nCODE_BLOCK_51\n<!-- response Python-asyncio -->\nCODE_BLOCK_52\n\n<!-- intro -->\njavascript\n<!-- request javascript -->\n\nCODE_BLOCK_53\n<!-- response javascript -->\nCODE_BLOCK_54\n\n<!-- intro -->\njava\n<!-- request Java -->\n\nCODE_BLOCK_55\n<!-- response Java -->\nCODE_BLOCK_56\n\n<!-- intro -->\nC#\n<!-- request C# -->\n\nCODE_BLOCK_57\n<!-- response C# -->\nCODE_BLOCK_58\n\n<!-- intro -->\nRust\n<!-- request Rust -->\n\nCODE_BLOCK_59\n<!-- response Rust -->\nCODE_BLOCK_60\n\n<!-- intro -->\nTypeScript\n<!-- request TypeScript -->\n\nCODE_BLOCK_61\n<!-- response typescript -->\nCODE_BLOCK_62\n\n<!-- intro -->\nGo\n<!-- request Go -->\n\nCODE_BLOCK_63\n<!-- response Go -->\nCODE_BLOCK_64\n<!-- end -->\n\n\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u0445 \u043f\u043e\u0438\u0441\u043a\u0430, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432 Manticore, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u043d\u0430\u0448\u0438\u0445 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u043a\u0443\u0440\u0441\u0430\u0445:\n* [\u0424\u0430\u0441\u0435\u0442\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a](https://play.manticoresearch.com/faceting/)\n* [\u0413\u0435\u043e\u043f\u043e\u0438\u0441\u043a](https://play.manticoresearch.com/geosearch/)\n* [\u041f\u043e\u0438\u0441\u043a \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432](https://play.manticoresearch.com/mlt/)\n\n<!-- example update -->\n## \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\n\n\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u2014 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0446\u0435\u043d\u0443 \u043d\u0430 18.5. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0432 \u043f\u043e \u043b\u044e\u0431\u043e\u043c\u0443 \u043f\u043e\u043b\u044e, \u043d\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435.\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\nCODE_BLOCK_65\n<!-- response SQL -->\n\nCODE_BLOCK_66\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n\nCODE_BLOCK_67\n\n<!-- response JSON -->\n\nCODE_BLOCK_68\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\nCODE_BLOCK_69\n\n<!-- intro -->\n##### Python:\n\n<!-- request Python -->\nCODE_BLOCK_70\n\n<!-- intro -->\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\nCODE_BLOCK_71\n\n<!-- intro -->\n##### Javascript:\n\n<!-- request javascript -->\nCODE_BLOCK_72\n\n<!-- intro -->\n##### java:\n\n<!-- request Java -->\nCODE_BLOCK_73\n\n<!-- intro -->\n##### C#:\n\n<!-- request C# -->\nCODE_BLOCK_74\n\n<!-- intro -->\n##### Rust:\n\n<!-- request Rust -->\nCODE_BLOCK_75\n\n<!-- intro -->\n##### TypeScript:\n\n<!-- request TypeScript -->\nCODE_BLOCK_76\n\n<!-- intro -->\n##### Go:\n\n<!-- request Go -->\nCODE_BLOCK_77\n\n<!-- end -->\n\n<!-- example delete -->\n## \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435\n\n\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u043c \u0432\u0441\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0441 \u0446\u0435\u043d\u043e\u0439 \u043d\u0438\u0436\u0435 10.\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\nCODE_BLOCK_78\n<!-- response SQL -->\n\nCODE_BLOCK_79\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n\nCODE_BLOCK_80\n\n<!-- response JSON -->\n\nCODE_BLOCK_81\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\nCODE_BLOCK_82\n<!-- response PHP -->\n\nCODE_BLOCK_83\n<!-- intro -->\n\n##### Python:\n\n<!-- request Python -->\nCODE_BLOCK_84\n\n<!-- intro -->\n\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\nCODE_BLOCK_85\n\n<!-- intro -->\n\n##### Javascript:\n\n<!-- request javascript -->\nCODE_BLOCK_86\n\n<!-- intro -->\n\n##### java:\n\n<!-- request Java -->\nCODE_BLOCK_87\n\n<!-- intro -->\n\n##### C#:\n\n<!-- request C# -->\nCODE_BLOCK_88\n\n<!-- intro -->\n\n##### Rust:\n\n<!-- request Rust -->\nCODE_BLOCK_89\n\n<!-- intro -->\n\n##### TypeScript:\n\n<!-- request TypeScript -->\nCODE_BLOCK_90\n\n<!-- intro -->\n\n##### Go:\n\n<!-- request Go -->\nCODE_BLOCK_91\n\n<!-- end -->\n<!-- proofread -->\n\n"
- },
- "is_code_or_comment": false,
- "model": "deepseek/deepseek-v3.2",
- "updated_at": 1766414421
- },
- "c441ba88feb278eac8b7e1e39b31d0dc8b6df26f70890aed8d2257787bd9f9b4": {
- "original": "# Quick start guide\n\n<!-- example install -->\n## Install and start Manticore\n\nYou can install and start Manticore easily on various operating systems, including Ubuntu, Centos, Debian, Windows, and MacOS. Additionally, you can also use Manticore as a Docker container.\n\n<!-- intro -->\n### Ubuntu\n\n<!-- request Ubuntu -->\nCODE_BLOCK_0\n\n<!-- intro -->\n### Debian\n\n<!-- request Debian -->\nCODE_BLOCK_1\n\n<!-- intro -->\n### Centos\n\n<!-- request Centos -->\nCODE_BLOCK_2\n\n<!-- intro -->\n### Windows\n\n<!-- request Windows -->\n* Download the Windows archive from https://manticoresearch.com/install/\n* Extract all files from the archive to `C:\\Manticore`\n* Run the following command to install Manticore as a service:\nCODE_BLOCK_3\n* Start Manticore from the Services snap-in of the Microsoft Management Console.\n\n<!-- intro -->\n### MacOS\n\n<!-- request MacOS -->\nCODE_BLOCK_4\n\n<!-- intro -->\n### Docker\n<!-- request Docker -->\nCODE_BLOCK_5\nFor persisting your data directory, read [how to use Manticore docker in production](Starting_the_server/Docker.md#Production-use)\n<!-- end -->\n\n<!-- example connect -->\n## Connect to Manticore\n\nBy default Manticore is waiting for your connections on:\n\n * port 9306 for MySQL clients\n * port 9308 for HTTP/HTTPS connections\n * port 9312 for connections from other Manticore nodes and clients based on Manticore binary API\n\nMore details about HTTPS support can be found in our learning course [here](https://play.manticoresearch.com/https/).\n\n<!-- intro -->\n##### Connect via MySQL:\n\n<!-- request SQL -->\nCODE_BLOCK_6\n\n<!-- intro -->\n##### Connect via JSON over HTTP\n\n<!-- request HTTP -->\nHTTP is a stateless protocol, so it doesn't require any special connection phase. You can simply send an HTTP request to the server and receive the response. To communicate with Manticore using the JSON interface, you can use any HTTP client library in your programming language of choice to send GET or POST requests to the server and parse the JSON responses:\n\nCODE_BLOCK_7\n\n<!-- intro -->\n##### Connect via [PHP client](https://github.com/manticoresoftware/manticoresearch-php):\n\n<!-- request PHP -->\nCODE_BLOCK_8\n\n<!-- intro -->\n##### Connect via [Python client](https://github.com/manticoresoftware/manticoresearch-php):\n\n<!-- request Python -->\nCODE_BLOCK_9\n\n<!-- intro -->\n##### Connect via [Python asyncio client](https://github.com/manticoresoftware/manticoresearch-php-asyncio):\n\n<!-- request Python-asyncio -->\nCODE_BLOCK_10\n\n<!-- intro -->\n##### Connect via [Javascript client](https://github.com/manticoresoftware/manticoresearch-javascript):\n\n<!-- request Javascript -->\nCODE_BLOCK_11\n<!-- intro -->\n##### Connect via [Java client](https://github.com/manticoresoftware/manticoresearch-java):\n\n<!-- request Java -->\nCODE_BLOCK_12\n\n<!-- intro -->\n##### Connect via [.Net client](https://github.com/manticoresoftware/manticoresearch-net):\n\n<!-- request C# -->\nCODE_BLOCK_13\n\n<!-- intro -->\n##### Connect via [Rust client](https://github.com/manticoresoftware/manticoresearch-rust):\n\n<!-- request Rust -->\nCODE_BLOCK_14\n\n<!-- intro -->\n##### Connect via [TypeScript client](https://github.com/manticoresoftware/manticoresearch-typescript):\n\n<!-- request Typescript -->\nCODE_BLOCK_15\n\n<!-- intro -->\n##### Connect via [Go client](https://github.com/manticoresoftware/manticoresearch-go):\n\n<!-- request Go -->\nCODE_BLOCK_16\n\n<!-- end -->\n\n<!-- example create -->\n## Create a table\n\nLet's now create a table called \"products\" with 2 fields:\n* title - full-text field which will contain our product's title\n* price - of type \"float\"\n\nNote that it is possible to omit creating a table with an explicit create statement. For more information, see [Auto schema](Data_creation_and_modification/Adding_documents_to_a_table/Adding_documents_to_a_real-time_table.md#Auto-schema).\n\nMore information about different ways to create a table can be found in our learning courses:\n* [Creating a RealTime table](https://play.manticoresearch.com/rtmode/)\n* [Creating a table from the MySQL source](https://play.manticoresearch.com/mysql/)\n* [Creating a table from the CSV source](https://play.manticoresearch.com/csv/)\n* [Creating a table using the auto schema mechanism](https://play.manticoresearch.com/autoschema/)\n* [Creating a table with Logstash/Beats](https://play.manticoresearch.com/logstash/)\n* [Creating a table with Fluentbit](https://play.manticoresearch.com/vectordev/)\n* [Creating a table using the Vector.dev agent](https://play.manticoresearch.com/vectordev/)\n\n<!-- intro -->\n##### SQL:\n<!-- request SQL -->\n\nCODE_BLOCK_17\n<!-- response -->\n\nCODE_BLOCK_18\n\n<!-- intro -->\n##### HTTP:\n\n<!-- request HTTP -->\n\nCODE_BLOCK_19\n\n<!-- response HTTP -->\nCODE_BLOCK_20\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\nCODE_BLOCK_21\n<!-- intro -->\n##### Python:\n\n<!-- request Python -->\n\nCODE_BLOCK_22\n\n<!-- intro -->\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\n\nCODE_BLOCK_23\n\n<!-- intro -->\n##### Javascript:\n\n<!-- request Javascript -->\n\nCODE_BLOCK_24\n\n<!-- intro -->\n##### Java:\n\n<!-- request Java -->\n\nCODE_BLOCK_25\n\n<!-- intro -->\n##### C#:\n\n<!-- request C# -->\n\nCODE_BLOCK_26\n\n<!-- intro -->\n##### Rust:\n\n<!-- request Rust -->\n\nCODE_BLOCK_27\n\n<!-- intro -->\n##### TypeScript:\n\n<!-- request TypeScript -->\nCODE_BLOCK_28\n\n<!-- intro -->\n##### Go:\n\n<!-- request Go -->\nCODE_BLOCK_29\n\n<!-- end -->\n\n<!-- example insert -->\n## Add documents\n\nLet's now add few documents to the table:\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\nCODE_BLOCK_30\n<!-- response SQL -->\n\nCODE_BLOCK_31\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n`\"id\":0` or no id forces automatic ID generation.\n\nCODE_BLOCK_32\n<!-- response JSON -->\n\nCODE_BLOCK_33\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\nCODE_BLOCK_34\n<!-- intro -->\n##### Python:\n\n<!-- request Python -->\n\nCODE_BLOCK_35\n\n<!-- intro -->\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\n\nCODE_BLOCK_36\n\n<!-- intro -->\n##### Javascript:\n\n<!-- request Javascript -->\n\nCODE_BLOCK_37\n\n<!-- intro -->\n##### java:\n\n<!-- request Java -->\n\nCODE_BLOCK_38\n\n<!-- intro -->\n##### C#:\n\n<!-- request C# -->\n\nCODE_BLOCK_39\n\n<!-- intro -->\n##### Rust:",
- "translations": {
- "chinese": "# \u5feb\u901f\u5165\u95e8\u6307\u5357\n\n<!-- example install -->\n## \u5b89\u88c5\u548c\u542f\u52a8 Manticore\n\n\u60a8\u53ef\u4ee5\u5728\u5404\u79cd\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8f7b\u677e\u5b89\u88c5\u5e76\u542f\u52a8 Manticore\uff0c\u5305\u62ec Ubuntu\u3001Centos\u3001Debian\u3001Windows \u548c MacOS\u3002\u6b64\u5916\uff0c\u60a8\u8fd8\u53ef\u4ee5\u5c06 Manticore \u4f5c\u4e3a Docker \u5bb9\u5668\u4f7f\u7528\u3002\n\n<!-- intro -->\n### Ubuntu\n\n<!-- request Ubuntu -->\nCODE_BLOCK_0\n\n<!-- intro -->\n### Debian\n\n<!-- request Debian -->\nCODE_BLOCK_1\n\n<!-- intro -->\n### Centos\n\n<!-- request Centos -->\nCODE_BLOCK_2\n\n<!-- intro -->\n### Windows\n\n<!-- request Windows -->\n* \u4ece https://manticoresearch.com/install/ \u4e0b\u8f7d Windows \u538b\u7f29\u5305\n* \u5c06\u538b\u7f29\u5305\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u89e3\u538b\u5230 `C:\\Manticore`\n* \u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5c06 Manticore \u5b89\u88c5\u4e3a\u670d\u52a1\uff1a\nCODE_BLOCK_3\n* \u901a\u8fc7 Microsoft \u7ba1\u7406\u63a7\u5236\u53f0\u7684\u201c\u670d\u52a1\u201d\u7ba1\u7406\u5355\u5143\u542f\u52a8 Manticore\u3002\n\n<!-- intro -->\n### MacOS\n\n<!-- request MacOS -->\nCODE_BLOCK_4\n\n<!-- intro -->\n### Docker\n<!-- request Docker -->\nCODE_BLOCK_5\n\u8981\u6301\u4e45\u5316\u60a8\u7684\u6570\u636e\u76ee\u5f55\uff0c\u8bf7\u9605\u8bfb [\u5982\u4f55\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528 Manticore docker](Starting_the_server/Docker.md#Production-use)\n<!-- end -->\n\n<!-- example connect -->\n## \u8fde\u63a5\u5230 Manticore\n\n\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cManticore \u5728\u4ee5\u4e0b\u7aef\u53e3\u7b49\u5f85\u60a8\u7684\u8fde\u63a5\uff1a\n\n * \u7aef\u53e3 9306 \u7528\u4e8e MySQL \u5ba2\u6237\u7aef\n * \u7aef\u53e3 9308 \u7528\u4e8e HTTP/HTTPS \u8fde\u63a5\n * \u7aef\u53e3 9312 \u7528\u4e8e\u5176\u4ed6 Manticore \u8282\u70b9\u548c\u57fa\u4e8e Manticore \u4e8c\u8fdb\u5236 API \u7684\u5ba2\u6237\u7aef\u8fde\u63a5\n\n\u6709\u5173 HTTPS \u652f\u6301\u7684\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u6211\u4eec\u7684\u5b66\u4e60\u8bfe\u7a0b [\u6b64\u5904](https://play.manticoresearch.com/https/)\u3002\n\n<!-- intro -->\n##### \u901a\u8fc7 MySQL \u8fde\u63a5\uff1a\n\n<!-- request SQL -->\nCODE_BLOCK_6\n\n<!-- intro -->\n##### \u901a\u8fc7 HTTP \u4e0a\u7684 JSON \u8fde\u63a5\n\n<!-- request HTTP -->\nHTTP \u662f\u65e0\u72b6\u6001\u534f\u8bae\uff0c\u56e0\u6b64\u4e0d\u9700\u8981\u4efb\u4f55\u7279\u6b8a\u7684\u8fde\u63a5\u9636\u6bb5\u3002\u60a8\u53ef\u4ee5\u76f4\u63a5\u5411\u670d\u52a1\u5668\u53d1\u9001 HTTP \u8bf7\u6c42\u5e76\u63a5\u6536\u54cd\u5e94\u3002\u8981\u901a\u8fc7 JSON \u63a5\u53e3\u4e0e Manticore \u901a\u4fe1\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u60a8\u9009\u62e9\u7684\u7f16\u7a0b\u8bed\u8a00\u4e2d\u7684\u4efb\u4f55 HTTP \u5ba2\u6237\u7aef\u5e93\u5411\u670d\u52a1\u5668\u53d1\u9001 GET \u6216 POST \u8bf7\u6c42\uff0c\u5e76\u89e3\u6790 JSON \u54cd\u5e94\uff1a\n\nCODE_BLOCK_7\n\n<!-- intro -->\n##### \u901a\u8fc7 [PHP \u5ba2\u6237\u7aef](https://github.com/manticoresoftware/manticoresearch-php) \u8fde\u63a5\uff1a\n\n<!-- request PHP -->\nCODE_BLOCK_8\n\n<!-- intro -->\n##### \u901a\u8fc7 [Python \u5ba2\u6237\u7aef](https://github.com/manticoresoftware/manticoresearch-php):\n\n<!-- request Python -->\nCODE_BLOCK_9\n\n<!-- intro -->\n##### \u901a\u8fc7 [Python asyncio \u5ba2\u6237\u7aef](https://github.com/manticoresoftware/manticoresearch-php-asyncio) \u8fde\u63a5\uff1a\n\n<!-- request Python-asyncio -->\nCODE_BLOCK_10\n\n<!-- intro -->\n##### \u901a\u8fc7 [Javascript \u5ba2\u6237\u7aef](https://github.com/manticoresoftware/manticoresearch-javascript) \u8fde\u63a5\uff1a\n\n<!-- request Javascript -->\nCODE_BLOCK_11\n<!-- intro -->\n##### \u901a\u8fc7 [Java \u5ba2\u6237\u7aef](https://github.com/manticoresoftware/manticoresearch-java) \u8fde\u63a5\uff1a\n\n<!-- request Java -->\nCODE_BLOCK_12\n\n<!-- intro -->\n##### \u901a\u8fc7 [.Net \u5ba2\u6237\u7aef](https://github.com/manticoresoftware/manticoresearch-net) \u8fde\u63a5\uff1a\n\n<!-- request C# -->\nCODE_BLOCK_13\n\n<!-- intro -->\n##### \u901a\u8fc7 [Rust \u5ba2\u6237\u7aef](https://github.com/manticoresoftware/manticoresearch-rust) \u8fde\u63a5\uff1a\n\n<!-- request Rust -->\nCODE_BLOCK_14\n\n<!-- intro -->\n##### \u901a\u8fc7 [TypeScript \u5ba2\u6237\u7aef](https://github.com/manticoresoftware/manticoresearch-typescript) \u8fde\u63a5\uff1a\n\n<!-- request Typescript -->\nCODE_BLOCK_15\n\n<!-- intro -->\n##### \u901a\u8fc7 [Go \u5ba2\u6237\u7aef](https://github.com/manticoresoftware/manticoresearch-go) \u8fde\u63a5\uff1a\n\n<!-- request Go -->\nCODE_BLOCK_16\n\n<!-- end -->\n\n<!-- example create -->\n## \u521b\u5efa\u8868\n\n\u73b0\u5728\u8ba9\u6211\u4eec\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a \"products\" \u7684\u8868\uff0c\u5305\u542b 2 \u4e2a\u5b57\u6bb5\uff1a\n* title - \u5168\u6587\u5b57\u6bb5\uff0c\u5c06\u5305\u542b\u6211\u4eec\u7684\u4ea7\u54c1\u6807\u9898\n* price - \u7c7b\u578b\u4e3a \"float\" \u7684\u5b57\u6bb5\n\n\u8bf7\u6ce8\u610f\uff0c\u53ef\u4ee5\u7701\u7565\u4f7f\u7528\u663e\u5f0f\u521b\u5efa\u8bed\u53e5\u6765\u521b\u5efa\u8868\u3002\u6709\u5173\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605 [\u81ea\u52a8\u6a21\u5f0f](Data_creation_and_modification/Adding_documents_to_a_table/Adding_documents_to_a_real-time_table.md#Auto-schema)\u3002\n\n\u6709\u5173\u521b\u5efa\u8868\u7684\u4e0d\u540c\u65b9\u6cd5\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u6211\u4eec\u7684\u5b66\u4e60\u8bfe\u7a0b\uff1a\n* [\u521b\u5efa RealTime \u8868](https://play.manticoresearch.com/rtmode/)\n* [\u4ece MySQL \u6e90\u521b\u5efa\u8868](https://play.manticoresearch.com/mysql/)\n* [\u4ece CSV \u6e90\u521b\u5efa\u8868](https://play.manticoresearch.com/csv/)\n* [\u4f7f\u7528\u81ea\u52a8\u6a21\u5f0f\u673a\u5236\u521b\u5efa\u8868](https://play.manticoresearch.com/autoschema/)\n* [\u4f7f\u7528 Logstash/Beats \u521b\u5efa\u8868](https://play.manticoresearch.com/logstash/)\n* [\u4f7f\u7528 Fluentbit \u521b\u5efa\u8868](https://play.manticoresearch.com/vectordev/)\n* [\u4f7f\u7528 Vector.dev \u4ee3\u7406\u521b\u5efa\u8868](https://play.manticoresearch.com/vectordev/)\n\n<!-- intro -->\n##### SQL:\n<!-- request SQL -->\n\nCODE_BLOCK_17\n<!-- response -->\n\nCODE_BLOCK_18\n\n<!-- intro -->\n##### HTTP:\n\n<!-- request HTTP -->\n\nCODE_BLOCK_19\n\n<!-- response HTTP -->\nCODE_BLOCK_20\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\nCODE_BLOCK_21\n<!-- intro -->\n##### Python:\n\n<!-- request Python -->\n\nCODE_BLOCK_22\n\n<!-- intro -->\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\n\nCODE_BLOCK_23\n\n<!-- intro -->\n##### Javascript:\n\n<!-- request Javascript -->\n\nCODE_BLOCK_24\n\n<!-- intro -->\n##### Java:\n\n<!-- request Java -->\n\nCODE_BLOCK_25\n\n<!-- intro -->\n##### C#:\n\n<!-- request C# -->\n\nCODE_BLOCK_26\n\n<!-- intro -->\n##### Rust:\n\n<!-- request Rust -->\n\nCODE_BLOCK_27\n\n<!-- intro -->\n##### TypeScript:\n\n<!-- request TypeScript -->\nCODE_BLOCK_28\n\n<!-- intro -->\n##### Go:\n\n<!-- request Go -->\nCODE_BLOCK_29\n\n<!-- end -->\n\n<!-- example insert -->\n## \u6dfb\u52a0\u6587\u6863\n\n\u73b0\u5728\u8ba9\u6211\u4eec\u5411\u8868\u4e2d\u6dfb\u52a0\u4e00\u4e9b\u6587\u6863\uff1a\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\nCODE_BLOCK_30\n<!-- response SQL -->\n\nCODE_BLOCK_31\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n`\"id\":0` \u6216\u6ca1\u6709 id \u4f1a\u5f3a\u5236\u81ea\u52a8 ID \u751f\u6210\u3002\n\nCODE_BLOCK_32\n<!-- response JSON -->\n\nCODE_BLOCK_33\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\nCODE_BLOCK_34\n<!-- intro -->\n##### Python:\n\n<!-- request Python -->\n\nCODE_BLOCK_35\n\n<!-- intro -->\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\n\nCODE_BLOCK_36\n\n<!-- intro -->\n##### Javascript:\n\n<!-- request Javascript -->\n\nCODE_BLOCK_37\n\n<!-- intro -->\n##### java:\n\n<!-- request Java -->\n\nCODE_BLOCK_38\n\n<!-- intro -->\n##### C#:\n\n<!-- request C# -->\n\nCODE_BLOCK_39\n\n<!-- intro -->\n##### Rust:",
- "russian": "# \u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u043d\u0430\u0447\u0430\u043b\u0443 \u0440\u0430\u0431\u043e\u0442\u044b\n\n<!-- example install -->\n## \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a Manticore\n\n\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0435\u0433\u043a\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Manticore \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f Ubuntu, Centos, Debian, Windows \u0438 MacOS. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Manticore \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 Docker.\n\n<!-- intro -->\n### Ubuntu\n\n<!-- request Ubuntu -->\nCODE_BLOCK_0\n\n<!-- intro -->\n### Debian\n\n<!-- request Debian -->\nCODE_BLOCK_1\n\n<!-- intro -->\n### Centos\n\n<!-- request Centos -->\nCODE_BLOCK_2\n\n<!-- intro -->\n### Windows\n\n<!-- request Windows -->\n* \u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0430\u0440\u0445\u0438\u0432 \u0434\u043b\u044f Windows \u0441 https://manticoresearch.com/install/\n* \u0418\u0437\u0432\u043b\u0435\u043a\u0438\u0442\u0435 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430 \u0432 `C:\\Manticore`\n* \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Manticore \u043a\u0430\u043a \u0441\u043b\u0443\u0436\u0431\u0443:\nCODE_BLOCK_3\n* \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 Manticore \u0438\u0437 \u043e\u0441\u043d\u0430\u0441\u0442\u043a\u0438 \"\u0421\u043b\u0443\u0436\u0431\u044b\" \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Microsoft.\n\n<!-- intro -->\n### MacOS\n\n<!-- request MacOS -->\nCODE_BLOCK_4\n\n<!-- intro -->\n### Docker\n<!-- request Docker -->\nCODE_BLOCK_5\n\u0414\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 [\u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Docker Manticore \u0432 production](Starting_the_server/Docker.md#Production-use)\n<!-- end -->\n\n<!-- example connect -->\n## \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a Manticore\n\n\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Manticore \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u0432\u0430\u0448\u0438\u0445 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043d\u0430:\n\n * \u043f\u043e\u0440\u0442\u0443 9306 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 MySQL\n * \u043f\u043e\u0440\u0442\u0443 9308 \u0434\u043b\u044f HTTP/HTTPS \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439\n * \u043f\u043e\u0440\u0442\u0443 9312 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 Manticore \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 API Manticore\n\n\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 HTTPS \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u043c \u043a\u0443\u0440\u0441\u0435 [\u0437\u0434\u0435\u0441\u044c](https://play.manticoresearch.com/https/).\n\n<!-- intro -->\n##### \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 MySQL:\n\n<!-- request SQL -->\nCODE_BLOCK_6\n\n<!-- intro -->\n##### \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 JSON \u043f\u043e\u0432\u0435\u0440\u0445 HTTP\n\n<!-- request HTTP -->\nHTTP \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0431\u0435\u0437 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0430\u0437\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c HTTP-\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442. \u0414\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Manticore \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c JSON-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e HTTP-\u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043d\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u0432\u0430\u043c\u0438 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 GET \u0438\u043b\u0438 POST \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 JSON-\u043e\u0442\u0432\u0435\u0442\u043e\u0432:\n\nCODE_BLOCK_7\n\n<!-- intro -->\n##### \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 [PHP \u043a\u043b\u0438\u0435\u043d\u0442](https://github.com/manticoresoftware/manticoresearch-php):\n\n<!-- request PHP -->\nCODE_BLOCK_8\n\n<!-- intro -->\n##### \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 [Python \u043a\u043b\u0438\u0435\u043d\u0442](https://github.com/manticoresoftware/manticoresearch-php):\n\n<!-- request Python -->\nCODE_BLOCK_9\n\n<!-- intro -->\n##### \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 [Python asyncio \u043a\u043b\u0438\u0435\u043d\u0442](https://github.com/manticoresoftware/manticoresearch-php-asyncio):\n\n<!-- request Python-asyncio -->\nCODE_BLOCK_10\n\n<!-- intro -->\n##### \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 [Javascript \u043a\u043b\u0438\u0435\u043d\u0442](https://github.com/manticoresoftware/manticoresearch-javascript):\n\n<!-- request Javascript -->\nCODE_BLOCK_11\n<!-- intro -->\n##### \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 [Java \u043a\u043b\u0438\u0435\u043d\u0442](https://github.com/manticoresoftware/manticoresearch-java):\n\n<!-- request Java -->\nCODE_BLOCK_12\n\n<!-- intro -->\n##### \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 [.Net \u043a\u043b\u0438\u0435\u043d\u0442](https://github.com/manticoresoftware/manticoresearch-net):\n\n<!-- request C# -->\nCODE_BLOCK_13\n\n<!-- intro -->\n##### \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 [Rust \u043a\u043b\u0438\u0435\u043d\u0442](https://github.com/manticoresoftware/manticoresearch-rust):\n\n<!-- request Rust -->\nCODE_BLOCK_14\n\n<!-- intro -->\n##### \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 [TypeScript \u043a\u043b\u0438\u0435\u043d\u0442](https://github.com/manticoresoftware/manticoresearch-typescript):\n\n<!-- request Typescript -->\nCODE_BLOCK_15\n\n<!-- intro -->\n##### \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 [Go \u043a\u043b\u0438\u0435\u043d\u0442](https://github.com/manticoresoftware/manticoresearch-go):\n\n<!-- request Go -->\nCODE_BLOCK_16\n\n<!-- end -->\n\n<!-- example create -->\n## \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b\n\n\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \"products\" \u0441 2 \u043f\u043e\u043b\u044f\u043c\u0438:\n* title \u2014 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\n* price \u2014 \u0442\u0438\u043f\u0430 \"float\"\n\n\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044f\u0432\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 create. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441\u043c. [\u0410\u0432\u0442\u043e\u0441\u0445\u0435\u043c\u0430](Data_creation_and_modification/Adding_documents_to_a_table/Adding_documents_to_a_real-time_table.md#Auto-schema).\n\n\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0432 \u043d\u0430\u0448\u0438\u0445 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u043a\u0443\u0440\u0441\u0430\u0445:\n* [\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 RealTime \u0442\u0430\u0431\u043b\u0438\u0446\u044b](https://play.manticoresearch.com/rtmode/)\n* [\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 MySQL](https://play.manticoresearch.com/mysql/)\n* [\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 CSV](https://play.manticoresearch.com/csv/)\n* [\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0430\u0432\u0442\u043e\u0441\u0445\u0435\u043c\u044b](https://play.manticoresearch.com/autoschema/)\n* [\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 Logstash/Beats](https://play.manticoresearch.com/logstash/)\n* [\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 Fluentbit](https://play.manticoresearch.com/vectordev/)\n* [\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0430\u0433\u0435\u043d\u0442\u0430 Vector.dev](https://play.manticoresearch.com/vectordev/)\n\n<!-- intro -->\n##### SQL:\n<!-- request SQL -->\n\nCODE_BLOCK_17\n<!-- response -->\n\nCODE_BLOCK_18\n\n<!-- intro -->\n##### HTTP:\n\n<!-- request HTTP -->\n\nCODE_BLOCK_19\n\n<!-- response HTTP -->\nCODE_BLOCK_20\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\nCODE_BLOCK_21\n<!-- intro -->\n##### Python:\n\n<!-- request Python -->\n\nCODE_BLOCK_22\n\n<!-- intro -->\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\n\nCODE_BLOCK_23\n\n<!-- intro -->\n##### Javascript:\n\n<!-- request Javascript -->\n\nCODE_BLOCK_24\n\n<!-- intro -->\n##### Java:\n\n<!-- request Java -->\n\nCODE_BLOCK_25\n\n<!-- intro -->\n##### C#:\n\n<!-- request C# -->\n\nCODE_BLOCK_26\n\n<!-- intro -->\n##### Rust:\n\n<!-- request Rust -->\n\nCODE_BLOCK_27\n\n<!-- intro -->\n##### TypeScript:\n\n<!-- request TypeScript -->\nCODE_BLOCK_28\n\n<!-- intro -->\n##### Go:\n\n<!-- request Go -->\nCODE_BLOCK_29\n\n<!-- end -->\n\n<!-- example insert -->\n## \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432\n\n\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443:\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\nCODE_BLOCK_30\n<!-- response SQL -->\n\nCODE_BLOCK_31\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n`\"id\":0` \u0438\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 id \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 ID.\n\nCODE_BLOCK_32\n<!-- response JSON -->\n\nCODE_BLOCK_33\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\nCODE_BLOCK_34\n<!-- intro -->\n##### Python:\n\n<!-- request Python -->\n\nCODE_BLOCK_35\n\n<!-- intro -->\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\n\nCODE_BLOCK_36\n\n<!-- intro -->\n##### Javascript:\n\n<!-- request Javascript -->\n\nCODE_BLOCK_37\n\n<!-- intro -->\n##### java:\n\n<!-- request Java -->\n\nCODE_BLOCK_38\n\n<!-- intro -->\n##### C#:\n\n<!-- request C# -->\n\nCODE_BLOCK_39\n\n<!-- intro -->\n##### Rust:"
- },
- "is_code_or_comment": false,
- "model": "deepseek/deepseek-v3.2",
- "updated_at": 1766414520
- },
- "__meta": {
- "source_text": "# Quick start guide\n\n<!-- example install -->\n## Install and start Manticore\n\nYou can install and start Manticore easily on various operating systems, including Ubuntu, Centos, Debian, Windows, and MacOS. Additionally, you can also use Manticore as a Docker container.\n\n<!-- intro -->\n### Ubuntu\n\n<!-- request Ubuntu -->\n```bash\nwget https://repo.manticoresearch.com/manticore-repo.noarch.deb\nsudo dpkg -i manticore-repo.noarch.deb\nsudo apt update\nsudo apt install manticore manticore-columnar-lib\nsudo systemctl start manticore\n```\n\n<!-- intro -->\n### Debian\n\n<!-- request Debian -->\n```bash\nwget https://repo.manticoresearch.com/manticore-repo.noarch.deb\nsudo dpkg -i manticore-repo.noarch.deb\nsudo apt update\nsudo apt install manticore manticore-columnar-lib\nsudo systemctl start manticore\n```\n\n<!-- intro -->\n### Centos\n\n<!-- request Centos -->\n```bash\nsudo yum install https://repo.manticoresearch.com/manticore-repo.noarch.rpm\nsudo yum install manticore manticore-columnar-lib\nsudo systemctl start manticore\n```\n\n<!-- intro -->\n### Windows\n\n<!-- request Windows -->\n* Download the Windows archive from https://manticoresearch.com/install/\n* Extract all files from the archive to `C:\\Manticore`\n* Run the following command to install Manticore as a service:\n* ```bash\n C:\\Manticore\\bin\\searchd --install --config C:\\Manticore\\sphinx.conf.in --servicename Manticore\n ```\n* Start Manticore from the Services snap-in of the Microsoft Management Console.\n\n<!-- intro -->\n### MacOS\n\n<!-- request MacOS -->\n```bash\nbrew install manticoresearch\nbrew services start manticoresearch\n```\n\n<!-- intro -->\n### Docker\n<!-- request Docker -->\n```bash\ndocker pull manticoresearch/manticore\ndocker run --name manticore -p9306:9306 -p9308:9308 -p9312:9312 -d manticoresearch/manticore\n```\nFor persisting your data directory, read [how to use Manticore docker in production](Starting_the_server/Docker.md#Production-use)\n<!-- end -->\n\n<!-- example connect -->\n## Connect to Manticore\n\nBy default Manticore is waiting for your connections on:\n\n * port 9306 for MySQL clients\n * port 9308 for HTTP/HTTPS connections\n * port 9312 for connections from other Manticore nodes and clients based on Manticore binary API\n\nMore details about HTTPS support can be found in our learning course [here](https://play.manticoresearch.com/https/).\n\n<!-- intro -->\n##### Connect via MySQL:\n\n<!-- request SQL -->\n```bash\nmysql -h0 -P9306\n```\n\n<!-- intro -->\n##### Connect via JSON over HTTP\n\n<!-- request HTTP -->\nHTTP is a stateless protocol, so it doesn't require any special connection phase. You can simply send an HTTP request to the server and receive the response. To communicate with Manticore using the JSON interface, you can use any HTTP client library in your programming language of choice to send GET or POST requests to the server and parse the JSON responses:\n\n```bash\ncurl -s \"http://localhost:9308/search\"\n```\n\n<!-- intro -->\n##### Connect via [PHP client](https://github.com/manticoresoftware/manticoresearch-php):\n\n<!-- request PHP -->\n```php\n// https://github.com/manticoresoftware/manticoresearch-php\nrequire_once __DIR__ . '/vendor/autoload.php';\n$config = ['host'=>'127.0.0.1','port'=>9308];\n$client = new \\Manticoresearch\\Client($config);\n```\n\n<!-- intro -->\n##### Connect via [Python client](https://github.com/manticoresoftware/manticoresearch-php):\n\n<!-- request Python -->\n```python\n// https://github.com/manticoresoftware/manticoresearch-python\nimport manticoresearch\nconfig = manticoresearch.Configuration(\n host = \"http://127.0.0.1:9308\"\n)\nclient = manticoresearch.ApiClient(config)\nindexApi = manticoresearch.IndexApi(client)\nsearchApi = manticoresearch.SearchApi(client)\nutilsApi = manticoresearch.UtilsApi(client)\n```\n\n<!-- intro -->\n##### Connect via [Python asyncio client](https://github.com/manticoresoftware/manticoresearch-php-asyncio):\n\n<!-- request Python-asyncio -->\n```python\n// https://github.com/manticoresoftware/manticoresearch-python-asyncio\nimport manticoresearch\nconfig = manticoresearch.Configuration(\n host = \"http://127.0.0.1:9308\"\n)\nasync with manticoresearch.ApiClient(config) as client:\n indexApi = manticoresearch.IndexApi(client)\n searchApi = manticoresearch.searchApi(client)\n utilsApi = manticoresearch.UtilsApi(client)\n```\n\n<!-- intro -->\n##### Connect via [Javascript client](https://github.com/manticoresoftware/manticoresearch-javascript):\n\n<!-- request Javascript -->\n```javascript\n// https://github.com/manticoresoftware/manticoresearch-javascript\nvar Manticoresearch = require('manticoresearch');\nvar client= new Manticoresearch.ApiClient()\nclient.basePath=\"http://127.0.0.1:9308\";\nindexApi = new Manticoresearch.IndexApi(client);\nsearchApi = new Manticoresearch.SearchApi(client);\nutilsApi = new Manticoresearch.UtilsApi(client);\n```\n<!-- intro -->\n##### Connect via [Java client](https://github.com/manticoresoftware/manticoresearch-java):\n\n<!-- request Java -->\n```java\n// https://github.com/manticoresoftware/manticoresearch-java\nimport com.manticoresearch.client.*;\nimport com.manticoresearch.client.model.*;\nimport com.manticoresearch.client.api.*;\n...\nApiClient client = Configuration.getDefaultApiClient();\nclient.setBasePath(\"http://127.0.0.1:9308\");\n...\nIndexApi indexApi = new IndexApi(client);\nSearchApi searchApi = new UtilsApi(client);\nUtilsApi utilsApi = new UtilsApi(client);\n```\n\n<!-- intro -->\n##### Connect via [.Net client](https://github.com/manticoresoftware/manticoresearch-net):\n\n<!-- request C# -->\n```clike\n// https://github.com/manticoresoftware/manticoresearch-net\nusing System.Net.Http;\n...\nusing ManticoreSearch.Client;\nusing ManticoreSearch.Api;\nusing ManticoreSearch.Model;\n...\nconfig = new Configuration();\nconfig.BasePath = \"http://localhost:9308\";\nhttpClient = new HttpClient();\nhttpClientHandler = new HttpClientHandler();\n...\nvar indexApi = new IndexApi(httpClient, config, httpClientHandler);\nvar searchApi = new SearchApi(httpClient, config, httpClientHandler);\nvar utilsApi = new UtilsApi(httpClient, config, httpClientHandler);\n```\n\n<!-- intro -->\n##### Connect via [Rust client](https://github.com/manticoresoftware/manticoresearch-rust):\n\n<!-- request Rust -->\n```rust\n// https://github.com/manticoresoftware/manticoresearch-rust\nuse std::sync::Arc;\nuse manticoresearch::{\n apis::{\n {configuration::Configuration,IndexApi,IndexApiClient,SearchApi,SearchApiClient,UtilsApi,UtilsApiClient}\n },\n};\n\nasync fn maticore_connect {\n\tlet configuration = Configuration {\n\t base_path: \"http://127.0.0.1:9308\".to_owned(),\n\t ..Default::default(),\n\t};\n let api_config = Arc::new(configuration);\n let utils_api = UtilsApiClient::new(api_config.clone());\n let index_api = IndexApiClient::new(api_config.clone());\n let search_api = SearchApiClient::new(api_config.clone());\n```\n\n<!-- intro -->\n##### Connect via [TypeScript client](https://github.com/manticoresoftware/manticoresearch-typescript):\n\n<!-- request Typescript -->\n```typescript\nimport {\n Configuration,\n IndexApi,\n SearchApi,\n UtilsApi\n} from \"manticoresearch-ts\";\n...\nconst config = new Configuration({\n basePath: 'http://localhost:9308',\n})\nconst indexApi = new IndexApi(config);\nconst searchApi = new SearchApi(config);\nconst utilsApi = new UtilsApi(config);\n```\n\n<!-- intro -->\n##### Connect via [Go client](https://github.com/manticoresoftware/manticoresearch-go):\n\n<!-- request Go -->\n```go\nimport (\n\t\"context\"\n\tmanticoreclient \"github.com/manticoresoftware/manticoresearch-go\"\n)\n...\nconfiguration := manticoreclient.NewConfiguration()\nconfiguration.Servers[0].URL = \"http://localhost:9308\"\napiClient := manticoreclient.NewAPIClient(configuration)\n```\n\n<!-- end -->\n\n<!-- example create -->\n## Create a table\n\nLet's now create a table called \"products\" with 2 fields:\n* title - full-text field which will contain our product's title\n* price - of type \"float\"\n\nNote that it is possible to omit creating a table with an explicit create statement. For more information, see [Auto schema](Data_creation_and_modification/Adding_documents_to_a_table/Adding_documents_to_a_real-time_table.md#Auto-schema).\n\nMore information about different ways to create a table can be found in our learning courses:\n* [Creating a RealTime table](https://play.manticoresearch.com/rtmode/)\n* [Creating a table from the MySQL source](https://play.manticoresearch.com/mysql/)\n* [Creating a table from the CSV source](https://play.manticoresearch.com/csv/)\n* [Creating a table using the auto schema mechanism](https://play.manticoresearch.com/autoschema/)\n* [Creating a table with Logstash/Beats](https://play.manticoresearch.com/logstash/)\n* [Creating a table with Fluentbit](https://play.manticoresearch.com/vectordev/)\n* [Creating a table using the Vector.dev agent](https://play.manticoresearch.com/vectordev/)\n\n<!-- intro -->\n##### SQL:\n<!-- request SQL -->\n\n```sql\ncreate table products(title text, price float) morphology='stem_en';\n```\n<!-- response -->\n\n```sql\nQuery OK, 0 rows affected (0.02 sec)\n```\n\n<!-- intro -->\n##### HTTP:\n\n<!-- request HTTP -->\n\n```bash\nPOST /cli -d \"create table products(title text, price float) morphology='stem_en'\"\n```\n\n<!-- response HTTP -->\n```json\n{\n\"total\":0,\n\"error\":\"\",\n\"warning\":\"\"\n}\n```\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\n```php\n$index = new \\Manticoresearch\\Index($client);\n$index->setName('products');\n$index->create([\n 'title'=>['type'=>'text'],\n 'price'=>['type'=>'float'],\n],['morphology' => 'stem_en']);\n```\n<!-- intro -->\n##### Python:\n\n<!-- request Python -->\n\n```python\nutilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'')\n```\n\n<!-- intro -->\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\n\n```python\nawait utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'')\n```\n\n<!-- intro -->\n##### Javascript:\n\n<!-- request Javascript -->\n\n```javascript\nres = await utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'');\n```\n\n<!-- intro -->\n##### Java:\n\n<!-- request Java -->\n\n```java\nutilsApi.sql(\"create table products(title text, price float) morphology='stem_en'\", true);\n```\n\n<!-- intro -->\n##### C#:\n\n<!-- request C# -->\n\n```clike\nutilsApi.Sql(\"create table products(title text, price float) morphology='stem_en'\", true);\n```\n\n<!-- intro -->\n##### Rust:\n\n<!-- request Rust -->\n\n```rust\nutils_api.sql(\"create table products(title text, price float) morphology='stem_en'\", Some(true)).await;\n```\n\n<!-- intro -->\n##### TypeScript:\n\n<!-- request TypeScript -->\n```typescript\nres = await utilsApi.sql('create table products(title text, price float) morphology=\\'stem_en\\'');\n```\n\n<!-- intro -->\n##### Go:\n\n<!-- request Go -->\n```go\nres := apiClient.UtilsAPI.Sql(context.Background()).Body(\"create table products(title text, price float) morphology='stem_en'\").Execute();\n```\n\n<!-- end -->\n\n<!-- example insert -->\n## Add documents\n\nLet's now add few documents to the table:\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\n```sql\ninsert into products(title,price) values ('Crossbody Bag with Tassel', 19.85), ('microfiber sheet set', 19.99), ('Pet Hair Remover Glove', 7.99);\n```\n<!-- response SQL -->\n\n```sql\nQuery OK, 3 rows affected (0.01 sec)\n```\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n`\"id\":0` or no id forces automatic ID generation.\n\n```json\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"Crossbody Bag with Tassel\",\n \"price\" : 19.85\n }\n}\n\n\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"microfiber sheet set\",\n \"price\" : 19.99\n }\n}\n\nPOST /insert\n{\n \"table\":\"products\",\n \"doc\":\n {\n \"title\" : \"Pet Hair Remover Glove\",\n \"price\" : 7.99\n }\n}\n```\n<!-- response JSON -->\n\n```json\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\n\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\n\n{\n \"table\": \"products\",\n \"_id\": 0,\n \"created\": true,\n \"result\": \"created\",\n \"status\": 201\n}\n```\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\n```php\n$index->addDocuments([\n ['title' => 'Crossbody Bag with Tassel', 'price' => 19.85],\n ['title' => 'microfiber sheet set', 'price' => 19.99],\n ['title' => 'Pet Hair Remover Glove', 'price' => 7.99]\n]);\n```\n<!-- intro -->\n##### Python:\n\n<!-- request Python -->\n\n``` python\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}})\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}})\nindexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}})\n```\n\n<!-- intro -->\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\n\n``` python\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}})\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}})\nawait indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}})\n```\n\n<!-- intro -->\n##### Javascript:\n\n<!-- request Javascript -->\n\n``` javascript\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Crossbody Bag with Tassel\", \"price\" : 19.85}});\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"microfiber sheet set\", \"price\" : 19.99}});\nres = await indexApi.insert({\"table\" : \"products\", \"doc\" : {\"title\" : \"Pet Hair Remover Glove\", \"price\" : 7.99}});\n```\n\n<!-- intro -->\n##### java:\n\n<!-- request Java -->\n\n``` java\nInsertDocumentRequest newdoc = new InsertDocumentRequest();\nHashMap<String,Object> doc = new HashMap<String,Object>(){{\n put(\"title\",\"Crossbody Bag with Tassel\");\n put(\"price\",19.85);\n}};\nnewdoc.index(\"products\").setDoc(doc);\nsqlresult = indexApi.insert(newdoc);\n\nnewdoc = new InsertDocumentRequest();\ndoc = new HashMap<String,Object>(){{\n put(\"title\",\"microfiber sheet set\");\n put(\"price\",19.99);\n}};\nnewdoc.index(\"products\").setDoc(doc);\nsqlresult = indexApi.insert(newdoc);\n\nnewdoc = new InsertDocumentRequest();\ndoc = new HashMap<String,Object>(){{\n put(\"title\",\"Pet Hair Remover Glove\");\n put(\"price\",7.99);\n }};\nnewdoc.index(\"products\").setDoc(doc);\nindexApi.insert(newdoc);\n```\n\n<!-- intro -->\n##### C#:\n\n<!-- request C# -->\n\n``` clike\nDictionary<string, Object> doc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"Crossbody Bag with Tassel\");\ndoc.Add(\"price\",19.85);\nInsertDocumentRequest insertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);\n\ndoc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"microfiber sheet set\");\ndoc.Add(\"price\",19.99);\ninsertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);\n\ndoc = new Dictionary<string, Object>();\ndoc.Add(\"title\",\"Pet Hair Remover Glove\");\ndoc.Add(\"price\",7.99);\ninsertDocumentRequest = new InsertDocumentRequest(index: \"products\", doc: doc);\nsqlresult = indexApi.Insert(insertDocumentRequest);\n```\n\n<!-- intro -->\n##### Rust:\n\n<!-- request Rust -->\n\n``` rust\nlet mut doc1 = HashMap::new();\ndoc1.insert(\"title\".to_string(), serde_json::json!(\"Crossbody Bag with Tassel\"));\ndoc1.insert(\"price\".to_string(), serde_json::json!(19.85));\nlet insert_req1 = InsertDocumentRequest::new(\"products\".to_string(), serde_json::json!(doc1));\nlet insert_res1 = index_api.insert(insert_req1).await;\n\nlet mut doc2 = HashMap::new();\ndoc2.insert(\"title\".to_string(), serde_json::json!(\"microfiber sheet set\"));\ndoc2.insert(\"price\".to_string(), serde_json::json!(19.99));\nlet insert_req2 = InsertDocumentRequest::new(\"products\".to_string(), serde_json::json!(doc2));\nlet insert_res2 = index_api.insert(insert_req2).await;\n\nlet mut doc3 = HashMap::new();\ndoc3.insert(\"title\".to_string(), serde_json::json!(\"Pet Hair Remover Glove\"));\ndoc3.insert(\"price\".to_string(), serde_json::json!(7.99));\nlet insert_req3 = InsertDocumentRequest::new(\"products\".to_string(), serde_json::json!(doc3));\nlet insert_res3 = index_api.insert(insert_req3).await;\n```\n\n<!-- intro -->\n##### TypeScript:\n\n<!-- request TypeScript -->\n\n``` typescript\nres = await indexApi.insert({\n index: 'test',\n id: 1,\n doc: { content: 'Text 1', name: 'Doc 1', cat: 1 },\n});\nres = await indexApi.insert({\n index: 'test',\n id: 2,\n doc: { content: 'Text 2', name: 'Doc 2', cat: 2 },\n});\nres = await indexApi.insert({\n index: 'test',\n id: 3,\n doc: { content: 'Text 3', name: 'Doc 3', cat: 7 },\n});\n```\n\n<!-- intro -->\n##### Go:\n\n<!-- request Go -->\n\n``` go\nindexDoc := map[string]interface{} {\"content\": \"Text 1\", \"name\": \"Doc 1\", \"cat\": 1 }\nindexReq := manticoreclient.NewInsertDocumentRequest(\"products\", indexDoc)\nindexReq.SetId(1)\napiClient.IndexAPI.Insert(context.Background()).InsertDocumentRequest(*indexReq).Execute()\n\nindexDoc = map[string]interface{} {\"content\": \"Text 2\", \"name\": \"Doc 3\", \"cat\": 2 }\nindexReq = manticoreclient.NewInsertDocumentRequest(\"products\", indexDoc)\nindexReq.SetId(2)\napiClient.IndexAPI.Insert(context.Background()).InsertDocumentRequest(*indexReq).Execute()\n\nindexDoc = map[string]interface{} {\"content\": \"Text 3\", \"name\": \"Doc 3\", \"cat\": 7 }\nindexReq = manticoreclient.NewInsertDocumentRequest(\"products\", indexDoc)\nindexReq.SetId(3)\napiClient.IndexAPI.Insert(context.Background()).InsertDocumentRequest(*indexReq).Execute()\n```\n\n<!-- end -->\n\nMore details on the subject can be found here:\n* [Adding data to a plain table](https://play.manticoresearch.com/mysql/)\n* [Adding data to a RealTime table](https://play.manticoresearch.com/rtintro/)\n\n\n<!-- example search -->\n## Search\n\nLet's find one of the documents. The query we will use is 'remove hair'. As you can see, it finds a document with the title 'Pet Hair Remover Glove' and highlights 'Hair remover' in it, even though the query has \"remove\", not \"remover\". This is because when we created the table, we turned on using English stemming (`morphology \"stem_en\"`).\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\n```sql\nselect id, highlight(), price from products where match('remove hair');\n```\n<!-- response SQL -->\n\n```sql\n+---------------------+-------------------------------+----------+\n| id | highlight() | price |\n+---------------------+-------------------------------+----------+\n| 1513686608316989452 | Pet <b>Hair Remover</b> Glove | 7.990000 |\n+---------------------+-------------------------------+----------+\n1 row in set (0.00 sec)\n```\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n\n```json\nPOST /search\n{\n \"table\": \"products\",\n \"query\": { \"match\": { \"title\": \"remove hair\" } },\n \"highlight\":\n {\n \"fields\": [\"title\"]\n }\n}\n```\n<!-- response JSON -->\n\n```json\n{\n \"took\": 0,\n \"timed_out\": false,\n \"hits\": {\n \"total\": 1,\n \"hits\": [\n {\n \"_id\": 1513686608316989452,\n \"_score\": 1680,\n \"_source\": {\n \"price\": 7.99,\n \"title\": \"Pet Hair Remover Glove\"\n },\n \"highlight\": {\n \"title\": [\n \"Pet <b>Hair Remover</b> Glove\"\n ]\n }\n }\n ]\n }\n}\n```\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\n```php\n$result = $index->search('@title remove hair')->highlight(['title'])->get();\nforeach($result as $doc)\n{\n echo \"Doc ID: \".$doc->getId().\"\\n\";\n echo \"Doc Score: \".$doc->getScore().\"\\n\";\n echo \"Document fields:\\n\";\n print_r($doc->getData());\n echo \"Highlights: \\n\";\n print_r($doc->getHighlight());\n}\n```\n<!-- response PHP -->\n\n```php\nDoc ID: 1513686608316989452\nDoc Score: 1680\nDocument fields:\nArray\n(\n [price] => 7.99\n [title] => Pet Hair Remover Glove\n)\nHighlights:\nArray\n(\n [title] => Array\n (\n [0] => Pet <b>Hair Remover</b> Glove\n )\n)\n\n```\n`\n\n<!-- intro -->\nPython\n<!-- request Python -->\n\n```python\nsearchApi.search({\"table\":\"products\",\"query\":{\"query_string\":\"@title remove hair\"},\"highlight\":{\"fields\":[\"title\"]}})\n```\n<!-- response Python -->\n``` python\n{'hits': {'hits': [{u'_id': u'1513686608316989452',\n u'_score': 1680,\n u'_source': {u'title': u'Pet Hair Remover Glove', u'price':7.99},\n u'highlight':{u'title':[u'Pet <b>Hair Remover</b> Glove']}}}],\n 'total': 1},\n 'profile': None,\n 'timed_out': False,\n 'took': 0}\n```\n\n<!-- intro -->\nPython-asyncio\n<!-- request Python-asyncio -->\n\n```python\nawait searchApi.search({\"table\":\"products\",\"query\":{\"query_string\":\"@title remove hair\"},\"highlight\":{\"fields\":[\"title\"]}})\n```\n<!-- response Python-asyncio -->\n``` python\n{'hits': {'hits': [{u'_id': u'1513686608316989452',\n u'_score': 1680,\n u'_source': {u'title': u'Pet Hair Remover Glove', u'price':7.99},\n u'highlight':{u'title':[u'Pet <b>Hair Remover</b> Glove']}}}],\n 'total': 1},\n 'profile': None,\n 'timed_out': False,\n 'took': 0}\n```\n\n<!-- intro -->\njavascript\n<!-- request javascript -->\n\n```javascript\nres = await searchApi.search({\"table\":\"products\",\"query\":{\"query_string\":\"@title remove hair\"}\"highlight\":{\"fields\":[\"title\"]}});\n```\n<!-- response javascript -->\n```javascript\n{\"hits\": {\"hits\": [{\"_id\": 1513686608316989452,\n \"_score\": 1680,\n \"_source\": {\"title\": \"Pet Hair Remover Glove\", \"price\":7.99},\n \"highlight\":{\"title\":[\"Pet <b>Hair Remover</b> Glove\"]}}],\n \"total\": 1},\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0}\n```\n\n<!-- intro -->\njava\n<!-- request Java -->\n\n```java\n\nquery = new HashMap<String,Object>();\nquery.put(\"query_string\",\"@title remove hair\");\nsearchRequest = new SearchRequest();\nsearchRequest.setIndex(\"forum\");\nsearchRequest.setQuery(query);\nHashMap<String,Object> highlight = new HashMap<String,Object>(){{\n put(\"fields\",new String[] {\"title\"});\n\n}};\nsearchRequest.setHighlight(highlight);\nsearchResponse = searchApi.search(searchRequest);\n```\n<!-- response Java -->\n```java\nclass SearchResponse {\n took: 84\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\n\n\n```\n\n<!-- intro -->\nC#\n<!-- request C# -->\n\n```clike\nobject query = new { query_string=\"@title remove hair\" };\nvar searchRequest = new SearchRequest(\"products\", query);\nvar highlight = new Highlight();\nhighlight.Fieldnames = new List<string> {\"title\"};\nsearchRequest.Highlight = highlight;\nsearchResponse = searchApi.Search(searchRequest);\n```\n<!-- response C# -->\n```clike\nclass SearchResponse {\n took: 103\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\n```\n\n<!-- intro -->\nRust\n<!-- request Rust -->\n\n```rust\nlet query = SearchQuery {\n query_string: Some(serde_json::json!(\"@title remove hair\").into()),\n ..Default::default()\n};\nlet highlight = Highlight {\n fields: Some(serde_json::json!([\"title\"]).into()),\n ..Default::default()\n};\nlet search_req = SearchRequest {\n table: \"products\".to_string(),\n query: Some(Box::new(query)),\n highlight: Some(Box::new(highlight)),\n ..Default::default(),\n};\nlet search_res = search_api.search(search_req).await;\n```\n<!-- response Rust -->\n```rust\nclass SearchResponse {\n took: 103\n timedOut: false\n hits: class SearchResponseHits {\n total: 1\n maxScore: null\n hits: [{_id=1513686608316989452, _score=1, _source={price=7.99, title=Pet Hair Remover Glove}, highlight={title=[Pet <b>Hair Remover</b> Glove]}}]\n aggregations: null\n }\n profile: null\n}\n```\n\n<!-- intro -->\nTypeScript\n<!-- request TypeScript -->\n\n```typescript\nres = await searchApi.search({\n index: 'test',\n query: { query_string: {'text 1'} },\n highlight: {'fields': ['content'] }\n});\n```\n<!-- response typescript -->\n```typescript\n{\n \"hits\":\n {\n \"hits\":\n [{\n \"_id\": 1,\n \"_score\": 1400,\n \"_source\": {\"content\":\"Text 1\",\"name\":\"Doc 1\",\"cat\":1},\n \"highlight\": {\"content\":[\"<b>Text 1</b>\"]}\n }],\n \"total\": 1\n },\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0\n}\n```\n\n<!-- intro -->\nGo\n<!-- request Go -->\n\n```go\nsearchRequest := manticoreclient.NewSearchRequest(\"test\")\nquery := map[string]interface{} {\"query_string\": \"text 1\"};\nsearchRequest.SetQuery(query);\n\nhighlightField := manticoreclient.NewHighlightField(\"content\")\nfields := []interface{}{ highlightField }\nhighlight := manticoreclient.NewHighlight()\nhighlight.SetFields(fields)\nsearchRequest.SetHighlight(highlight);\n\nres, _, _ := apiClient.SearchAPI.Search(context.Background()).SearchRequest(*searchRequest).Execute()\n```\n<!-- response Go -->\n```go\n{\n \"hits\":\n {\n \"hits\":\n [{\n \"_id\": 1,\n \"_score\": 1400,\n \"_source\": {\"content\":\"Text 1\",\"name\":\"Doc 1\",\"cat\":1},\n \"highlight\": {\"content\":[\"<b>Text 1</b>\"]}\n }],\n \"total\": 1\n },\n \"profile\": None,\n \"timed_out\": False,\n \"took\": 0\n}\n```\n<!-- end -->\n\nMore information on different search options available in Manticore can be found in our learning courses:\n* [Faceted search](https://play.manticoresearch.com/faceting/)\n* [Geo search](https://play.manticoresearch.com/geosearch/)\n* [Searching for similar documents](https://play.manticoresearch.com/mlt/)\n\n<!-- example update -->\n## Update\n\nLet's assume we now want to update the document - change the price to 18.5. This can be done by filtering by any field, but normally you know the document id and update something based on that.\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\n```sql\nupdate products set price=18.5 where id = 1513686608316989452;\n```\n<!-- response SQL -->\n\n```sql\nQuery OK, 1 row affected (0.00 sec)\n```\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n\n```json\nPOST /update\n{\n \"table\": \"products\",\n \"id\": 1513686608316989452,\n \"doc\":\n {\n \"price\": 18.5\n }\n}\n```\n\n<!-- response JSON -->\n\n```json\n{\n \"table\": \"products\",\n \"_id\": 1513686608316989452,\n \"result\": \"updated\"\n}\n```\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\n```php\n$doc = [\n 'body' => [\n 'table' => 'products',\n 'id' => 2,\n 'doc' => [\n 'price' => 18.5\n ]\n ]\n];\n\n$response = $client->update($doc);\n```\n\n<!-- intro -->\n##### Python:\n\n<!-- request Python -->\n``` python\nindexApi = api = manticoresearch.IndexApi(client)\nindexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}})\n```\n\n<!-- intro -->\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\n``` python\nindexApi = api = manticoresearch.IndexApi(client)\nawait indexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}})\n```\n\n<!-- intro -->\n##### Javascript:\n\n<!-- request javascript -->\n``` javascript\nres = await indexApi.update({\"table\" : \"products\", \"id\" : 1513686608316989452, \"doc\" : {\"price\":18.5}});\n```\n\n<!-- intro -->\n##### java:\n\n<!-- request Java -->\n``` java\nUpdateDocumentRequest updateRequest = new UpdateDocumentRequest();\ndoc = new HashMap<String,Object >(){{\n put(\"price\",18.5);\n}};\nupdateRequest.index(\"products\").id(1513686608316989452L).setDoc(doc);\nindexApi.update(updateRequest);\n```\n\n<!-- intro -->\n##### C#:\n\n<!-- request C# -->\n``` clike\nDictionary<string, Object> doc = new Dictionary<string, Object>();\ndoc.Add(\"price\", 18.5);\nUpdateDocumentRequest updateDocumentRequest = new UpdateDocumentRequest(index: \"products\", id: 1513686608316989452L, doc: doc);\nindexApi.Update(updateDocumentRequest);\n```\n\n<!-- intro -->\n##### Rust:\n\n<!-- request Rust -->\n``` rust\nlet mut doc = HashMap::new();\ndoc.insert(\"price\".to_string(), serde_json::json!(18.5));\nlet update_req = UpdateDocumentRequest {\n table: serde_json::json!(\"products\"),\n doc: serde_json::json!(doc),\n id: serde_json::json!(1513686608316989452),\n ..Default::default(),\n};\nlet update_res = index_api.update(update_req).await;\n```\n\n<!-- intro -->\n##### TypeScript:\n\n<!-- request TypeScript -->\n``` typescript\nres = await indexApi.update({ index: \"test\", id: 1, doc: { cat: 10 } });\n```\n\n<!-- intro -->\n##### Go:\n\n<!-- request Go -->\n``` go\nupdDoc = map[string]interface{} {\"cat\": 10}\nupdRequest = manticoreclient.NewUpdateDocumentRequest(\"test\", updDoc)\nupdRequest.SetId(1)\nres, _, _ = apiClient.IndexAPI.Update(context.Background()).UpdateDocumentRequest(*updRequest).Execute()\n```\n\n<!-- end -->\n\n<!-- example delete -->\n## Delete\n\nLet's now delete all documents with price lower than 10.\n\n<!-- intro -->\n##### SQL:\n\n<!-- request SQL -->\n\n```sql\ndelete from products where price < 10;\n```\n<!-- response SQL -->\n\n```sql\nQuery OK, 1 row affected (0.00 sec)\n```\n\n<!-- intro -->\n##### JSON:\n\n<!-- request JSON -->\n\n```json\nPOST /delete\n{\n \"table\": \"products\",\n \"query\":\n {\n \"range\":\n {\n \"price\":\n {\n \"lte\": 10\n }\n }\n }\n}\n```\n\n<!-- response JSON -->\n\n```json\n{\n \"table\": \"products\",\n \"deleted\": 1\n}\n```\n\n<!-- intro -->\n##### PHP:\n\n<!-- request PHP -->\n\n```php\n$result = $index->deleteDocuments(new \\Manticoresearch\\Query\\Range('price',['lte'=>10]));\n\n```\n<!-- response PHP -->\n\n```php\nArray\n(\n [_index] => products\n [deleted] => 1\n)\n\n```\n<!-- intro -->\n\n##### Python:\n\n<!-- request Python -->\n``` python\nindexApi.delete({\"table\" : \"products\", \"query\": {\"range\":{\"price\":{\"lte\":10}}}})\n```\n\n<!-- intro -->\n\n##### Python-asyncio:\n\n<!-- request Python-asyncio -->\n``` python\nawait indexApi.delete({\"table\" : \"products\", \"query\": {\"range\":{\"price\":{\"lte\":10}}}})\n```\n\n<!-- intro -->\n\n##### Javascript:\n\n<!-- request javascript -->\n``` javascript\nres = await indexApi.delete({\"table\" : \"products\", \"query\": {\"range\":{\"price\":{\"lte\":10}}}});\n```\n\n<!-- intro -->\n\n##### java:\n\n<!-- request Java -->\n``` java\nDeleteDocumentRequest deleteRequest = new DeleteDocumentRequest();\nquery = new HashMap<String,Object>();\nquery.put(\"range\",new HashMap<String,Object>(){{\n put(\"price\",new HashMap<String,Object>(){{\n put(\"lte\",10);\n }});\n}});\ndeleteRequest.index(\"products\").setQuery(query);\nindexApi.delete(deleteRequest);\n\n```\n\n<!-- intro -->\n\n##### C#:\n\n<!-- request C# -->\n``` clike\nDictionary<string, Object> price = new Dictionary<string, Object>();\nprice.Add(\"lte\", 10);\nDictionary<string, Object> range = new Dictionary<string, Object>();\nrange.Add(\"price\", price);\nDeleteDocumentRequest deleteDocumentRequest = new DeleteDocumentRequest(index: \"products\", query: range);\nindexApi.Delete(deleteDocumentRequest);\n```\n\n<!-- intro -->\n\n##### Rust:\n\n<!-- request Rust -->\n``` rust\nlet mut price_range= HashMap::new();\nprice_range.insert(\"lte\".to_string(), serde_json::json!(10));\nlet mut range= HashMap::new();\nrange.insert(\"price\".to_string(), serde_json::json!(price_range));\nlet delete_req = DeleteDocumentRequest {\n table: \"products\".to_string(),\n query: serde_json::json!(range),\n ..Default::default(),\n};\nindex_api.delete(delete_req).await;\n```\n\n<!-- intro -->\n\n##### TypeScript:\n\n<!-- request TypeScript -->\n``` typescript\nres = await indexApi.delete({\n index: 'test',\n query: { match: { '*': 'Text 1' } },\n});\n```\n\n<!-- intro -->\n\n##### Go:\n\n<!-- request Go -->\n``` go\ndelRequest := manticoreclient.NewDeleteDocumentRequest(\"test\")\nmatchExpr := map[string]interface{} {\"*\": \"Text 1t\"}\ndelQuery := map[string]interface{} {\"match\": matchExpr }\ndelRequest.SetQuery(delQuery)\nres, _, _ := apiClient.IndexAPI.Delete(context.Background()).DeleteDocumentRequest(*delRequest).Execute();\n```\n\n<!-- end -->\n<!-- proofread -->\n\n",
- "updated_at": 1768530797,
- "source_md5": "8842df82ece616b247b745b9622a63f2"
- }
- }
|