本文主要是介绍Elasticsearch exception [type=index_not_found_exception, reason=no such index [jq_product]],希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
报错信息:
org.elasticsearch.ElasticsearchStatusException: Elasticsearch exception [type=index_not_found_exception, reason=no such index [jq_product]]at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:177) ~[elasticsearch-7.6.2.jar:7.6.2]
org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate.execute(ElasticsearchRestTemplate.java:359) ~[spring-data-elasticsearch-4.0.4.RELEASE.jar:4.0.4.RELEASE]at org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate.search(ElasticsearchRestTemplate.java:269) ~[spring-data-elasticsearch-4.0.4.RELEASE.jar:4.0.4.RELEASE]at org.springframework.data.elasticsearch.core.AbstractElasticsearchTemplate.search(AbstractElasticsearchTemplate.java:331) ~[spring-data-elasticsearch-4.0.4.RELEASE.jar:4.0.4.RELEASE]at com.jq.service.impl.SearchProductServiceImpl.searchProduct(SearchProductServiceImpl.java:42) ~[classes/:na]at com.jq.controller.SearchController.getSearchProduct(SearchController.java:22) ~[classes/:na]at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_201]at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_201]at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_201]at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_201]at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) ~[spring-web-5.2.9.RELEASE.jar:5.2.9.RELEASE]at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.2.9.RELEASE.jar:5.2.9.RELEASE]at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105) ~[spring-webmvc-5.2.9.RELEASE.jar:5.2.9.RELEASE]at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878) ~[spring-webmvc-5.2.9.RELEASE.jar:5.2.9.RELEASE]at at java.lang.Thread.run(Thread.java:748) [na:1.8.0_201]Suppressed: org.elasticsearch.client.ResponseException: method [POST], host [http://192.168.230.134:9200], URI [/jq_product/_search?pre_filter_shard_size=128&typed_keys=true&max_concurrent_shard_requests=5&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&ignore_throttled=true&search_type=dfs_query_then_fetch&batched_reduce_size=512&ccs_minimize_roundtrips=true], status line [HTTP/1.1 404 Not Found]
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [jq_product]","resource.type":"index_or_alias","resource.id":"jq_product","index_uuid":"_na_","index":"jq_product"}],"type":"index_not_found_exception","reason":"no such index [jq_product]","resource.type":"index_or_alias","resource.id":"jq_product","index_uuid":"_na_","index":"jq_product"},"status":404}at org.elasticsearch.client.RestClient.convertResponse(RestClient.java:283) ~[elasticsearch-rest-client-7.6.2.jar:7.6.2]at org.elasticsearch.client.RestClient.performRequest(RestClient.java:261) ~[elasticsearch-rest-client-7.6.2.jar:7.6.2]at org.elasticsearch.client.RestClient.performRequest(RestClient.java:235) ~[elasticsearch-rest-client-7.6.2.jar:7.6.2]at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1514) ~[elasticsearch-rest-high-level-client-7.6.2.jar:7.6.2]... 59 common frames omitted
顾名思义,没有该索引库。
报错位置:查看是否一致
这篇关于Elasticsearch exception [type=index_not_found_exception, reason=no such index [jq_product]]的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!