# Elastic search response parsing error

**URL:** <https://discuss.elastic.co/t/elastic-search-response-parsing-error/342909>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [September 13, 2023, 6:59am UTC](https://discuss.elastic.co/t/elastic-search-response-parsing-error/342909 "2023-09-13T06:59:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mangeshs](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@mangeshs](https://discuss.elastic.co/u/mangeshs)\
**Post date:** [September 13, 2023, 6:59am UTC](https://discuss.elastic.co/t/elastic-search-response-parsing-error/342909/1 "2023-09-13T06:59:17Z")

</div>

I am using 7.4 El;asticSearchClient and querying to Elasticsearch.  
I am getting response in profile object like below  
"profile": {  
"shards": [  
{  
"id": "[GArOi1iwQHGY2qpSalRgHw][hbs-search-3][0]",  
"searches": [  
{  
"query": ["rewrite\_time": 2061901,  
"collector": [  
{  
"name": "SimpleTopScoreDocCollector",  
"reason": "search\_top\_hits",  
"time\_in\_nanos": 30527860  
}  
]  
}  
],  
"aggregations": ,  
"fetch": {  
"type": "fetch",  
"description": "",  
"time\_in\_nanos": 2716234862,  
"breakdown": {  
"load\_stored\_fields": 4382099,  
"load\_source": 13298,  
"load\_stored\_fields\_count": 50,  
"next\_reader\_count": 8,  
"load\_source\_count": 50,  
"next\_reader": 96419  
},  
"debug": {  
"stored\_fields": [  
"\_id",  
"\_routing",  
"\_source"  
]  
},  
"children": [  
{  
"type": "ExplainPhase",  
"description": "",  
"time\_in\_nanos": 2487325658,  
"breakdown": {  
"process\_count": 50,  
**"process": 2487313600,**

and using co.elastic.clients.elasticsearch.SearchResponse class from java service to get parsed response but as in abouve response value "process": 2487313600 is out of bound for int value as SearchResponse class has variable for same is of type int

```
@Nullable
private final Integer process;

```

i tried doing parser changes at get client level

```auto
 ObjectMapper mapper = new ObjectMapper();
			mapper.configure(DeserializationFeature.USE_LONG_FOR_INTS, true);
			JacksonJsonpMapper jacksonJsonpMapper= new JacksonJsonpMapper(mapper);
			
            ElasticsearchTransport transport = new RestClientTransport(restClient, jacksonJsonpMapper);
            ElasticsearchClient client = new ElasticsearchClient(transport);
            success = true;
            return client;

```

any thing need to add to get that value as long or profile time in millis

---

<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:** [October 11, 2023, 6:59am UTC](https://discuss.elastic.co/t/elastic-search-response-parsing-error/342909/2 "2023-10-11T06:59:57Z")

</div>

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