# Failed to parse field \[fields\]\]

**URL:** <https://discuss.elastic.co/t/failed-to-parse-field-fields/140327>\
**Category:** Elasticsearch\
**Created:** [July 17, 2018, 12:15pm UTC](https://discuss.elastic.co/t/failed-to-parse-field-fields/140327 "2018-07-17T12:15:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![halleystar](https://avatars.discourse-cdn.com/v4/letter/h/9fc29f/32.png) [@halleystar](https://discuss.elastic.co/u/halleystar)\
**Post date:** [July 17, 2018, 12:15pm UTC](https://discuss.elastic.co/t/failed-to-parse-field-fields/140327/1 "2018-07-17T12:15:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 14, 2018, 12:15pm UTC](https://discuss.elastic.co/t/failed-to-parse-field-fields/140327/2 "2018-08-14T12:15:46Z")

</div>

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