Failed to parse field [fields]]

The elasticsearch version is 5.6.4 and the RestHighLevelClient is also 5.6.4

SearchRequest{searchType=QUERY_THEN_FETCH, indices=[gis-region-alias], indicesOptions=IndicesOptions[id=38, ignore_unavailable=false, allow_no_indices=true, expand_wildcards_open=true, expand_wildcards_closed=false, allow_alisases_to_multiple_indices=true, forbid_closed_indices=true], types=[region], routing='null', preference='null', requestCache=null, scroll=null, maxConcurrentShardRequests=0, batchedReduceSize=512, preFilterShardSize=128, source={
"size" : 5000,
"query" : {
"bool" : {
"should" : [
{
"bool" : {
"must" : [
{
"term" : {
"city_id" : {
"value" : 4,
"boost" : 1.0
}
}
}
],
"must_not" : [
{
"geo_shape" : {
"region" : {
"shape" : {
"type" : "polygon",
"orientation" : "right",
"coordinates" : [
[
[
114.482699,
39.267736
],
[
114.749459,
40.430527
],
[
118.654286,
40.398887
],
[
118.612892,
38.28846
],
[
114.450503,
38.559834
],
[
114.482699,
39.267736
]
]
]
},
"relation" : "within"
},
"ignore_unmapped" : false,
"boost" : 1.0
}
}
],
"disable_coord" : false,
"adjust_pure_negative" : true,
"boost" : 1.0
}
},
{
"bool" : {
"must_not" : [
{
"geo_shape" : {
"region" : {
"shape" : {
"type" : "polygon",
"orientation" : "right",
"coordinates" : [
[
[
114.482699,
39.267736
],
[
114.749459,
40.430527
],
[
118.654286,
40.398887
],
[
118.612892,
38.28846
],
[
114.450503,
38.559834
],
[
114.482699,
39.267736
]
]
]
},
"relation" : "disjoint"
},
"ignore_unmapped" : false,
"boost" : 1.0
}
},
{
"term" : {
"city_id" : {
"value" : 4,
"boost" : 1.0
}
}
}
],
"disable_coord" : false,
"adjust_pure_negative" : true,
"boost" : 1.0
}
}
],
"disable_coord" : false,
"adjust_pure_negative" : true,
"boost" : 1.0
}
},
"_source" : {
"includes" : [
"id",
"name",
"city_id",
"area_id",
"status"
],
"excludes" : [ ]
},
"script_fields" : {
"border" : {
"script" : {
"source" : "params['_source']['region']",
"lang" : "painless"
},
"ignore_failure" : false
}
}
}}
java.io.IOException: Unable to parse response body for Response{requestLine=GET /gis-region-alias/region/_search?typed_keys=true&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&search_type=query_then_fetch&batched_reduce_size=512 HTTP/1.1, host=http://xxxx:9600, response=HTTP/1.1 200 OK}
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:415)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:382)
at org.elasticsearch.client.RestHighLevelClient.search(RestHighLevelClient.java:323)
Caused by: ParsingException[[innerHitParser] failed to parse field [fields]]; nested: ParsingException[Failed to parse object: unexpected token [START_OBJECT] found];
at org.elasticsearch.common.xcontent.ObjectParser.parseValue(ObjectParser.java:369)
at org.elasticsearch.common.xcontent.ObjectParser.parseSub(ObjectParser.java:378)
at org.elasticsearch.common.xcontent.ObjectParser.parse(ObjectParser.java:169)
at org.elasticsearch.common.xcontent.ObjectParser.apply(ObjectParser.java:183)
at org.elasticsearch.search.SearchHit.fromXContent(SearchHit.java:662)
at org.elasticsearch.search.SearchHits.fromXContent(SearchHits.java:180)
at org.elasticsearch.action.search.SearchResponse.fromXContent(SearchResponse.java:271)
at org.elasticsearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:526)
at org.elasticsearch.client.RestHighLevelClient.lambda$performRequestAndParseEntity$2(RestHighLevelClient.java:382)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:413)
... 75 more
Caused by: ParsingException[Failed to parse object: unexpected token [START_OBJECT] found]
at org.elasticsearch.common.xcontent.XContentParserUtils.throwUnknownToken(XContentParserUtils.java:67)
at org.elasticsearch.common.xcontent.XContentParserUtils.parseStoredFieldsValue(XContentParserUtils.java:108)
at org.elasticsearch.search.SearchHit.parseFields(SearchHit.java:776)
at org.elasticsearch.search.SearchHit.lambda$declareInnerHitsParseFields$13(SearchHit.java:684)
at org.elasticsearch.common.xcontent.AbstractObjectParser.lambda$declareObject$1(AbstractObjectParser.java:56)
at org.elasticsearch.common.xcontent.ObjectParser.lambda$declareField$1(ObjectParser.java:214)
at org.elasticsearch.common.xcontent.ObjectParser.parseValue(ObjectParser.java:367)
... 84 more

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.