Hello, I am trying to run a very simple query using the High Level Client for Java version 6.8.23
The query is like the following:
{
"query": {
"wildcard": {
"OBJECTINFO.NAME": {
"wildcard": "test*",
"boost": 1.0
}
}
}
}
It fails with the following error:
[17/05/22 11:06:34.265] ERROR ElasticSearchSearcherImplementation.meth03_eomjse1: @T:192 ExecuteQuery fail
org.elasticsearch.ElasticsearchStatusException: Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]
at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:177) ~[elasticsearch-6.8.23.jar:6.8.23]
at org.elasticsearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:2061) ~[elasticsearch-rest-high-level-client-6.8.23.jar:6.8.23]
at org.elasticsearch.client.RestHighLevelClient.parseResponseException(RestHighLevelClient.java:2031) ~[elasticsearch-rest-high-level-client-6.8.23.jar:6.8.23]
at org.elasticsearch.client.RestHighLevelClient$1.onFailure(RestHighLevelClient.java:1948) ~[elasticsearch-rest-high-level-client-6.8.23.jar:6.8.23]
at org.elasticsearch.client.RestClient$FailureTrackingResponseListener.onDefinitiveFailure(RestClient.java:857) ~[elasticsearch-rest-client-6.8.23.jar:6.8.23]
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:560) ~[elasticsearch-rest-client-6.8.23.jar:6.8.23]
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:537) ~[elasticsearch-rest-client-6.8.23.jar:6.8.23]
at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:119) ~[httpcore-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:177) ~[httpasyncclient-4.1.2.jar:4.1.2]
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:436) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:326) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.client.InternalRequestExecutor.inputReady(InternalRequestExecutor.java:83) ~[httpasyncclient-4.1.2.jar:4.1.2]
at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:265) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81) ~[httpasyncclient-4.1.2.jar:4.1.2]
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39) ~[httpasyncclient-4.1.2.jar:4.1.2]
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:114) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:588) ~[httpcore-nio-4.4.5.jar:4.4.5]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_322]
Suppressed: org.elasticsearch.client.ResponseException: method [POST], host [http://zzz.xxx.yyy:9200], URI [/default@meth03_eomjse1_qa_search/_search?rest_total_hits_as_int=true&typed_keys=true&ignore_unavailable=true&expand_wildcar
ds=none&allow_no_indices=true&ignore_throttled=false&search_type=query_then_fetch&batched_reduce_size=512], status line [HTTP/1.1 400 Bad Request]
{"error":{"root_cause":[{"type":"parse_exception","reason":"parse_exception: Encountered \" \"}\" \"} \"\" at line 1, column 23.\nWas expecting:\n \"TO\" ...\n "}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query"
,"grouped":true,"failed_shards":[{"shard":0,"index":"default@meth03_eomjse1_qa","node":"XZq0gZWGS8SXPR7Sjk5vbA","reason":{"type":"query_shard_exception","reason":"Failed to parse query [{'query':{'match_all':{}}}]","index_uuid":"6Ht7EgP5QemZGQ7_ccn_2g","in
dex":"default@meth03_eomjse1_qa","caused_by":{"type":"parse_exception","reason":"parse_exception: Cannot parse '{'query':{'match_all':{}}}': Encountered \" \"}\" \"} \"\" at line 1, column 23.\nWas expecting:\n \"TO\" ...\n ","caused_by":{"type":"par
se_exception","reason":"parse_exception: Encountered \" \"}\" \"} \"\" at line 1, column 23.\nWas expecting:\n \"TO\" ...\n "}}}}],"caused_by":{"type":"parse_exception","reason":"parse_exception: Encountered \" \"}\" \"} \"\" at line 1, column 23.\nW
as expecting:\n \"TO\" ...\n "}},"status":400}
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:552) ~[elasticsearch-rest-client-6.8.23.jar:6.8.23]
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:537) ~[elasticsearch-rest-client-6.8.23.jar:6.8.23]
at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:119) ~[httpcore-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:177) ~[httpasyncclient-4.1.2.jar:4.1.2]
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:436) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:326) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.client.InternalRequestExecutor.inputReady(InternalRequestExecutor.java:83) ~[httpasyncclient-4.1.2.jar:4.1.2]
at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:265) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81) ~[httpasyncclient-4.1.2.jar:4.1.2]
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39) ~[httpasyncclient-4.1.2.jar:4.1.2]
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:114) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104) ~[httpcore-nio-4.4.5.jar:4.4.5]
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:588) ~[httpcore-nio-4.4.5.jar:4.4.5]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_322]
What is strange is that it looks like I am trying to use a RANGE, but there is no RANGE, or square brackets, or anything else that would suggest I am using a RANGE in my query:
Encountered \" \"}\" \"} \"\" at line 1, column 23.\nW
as expecting:\n \"TO\" ...\n "}},"status":400}
Any help would be really appreciated.
Thanks very much
Giuseppe