# Script query is not returning whole double value

**URL:** https://discuss.elastic.co/t/script-query-is-not-returning-whole-double-value/278871
**Category:** Elasticsearch
**Tags:** painless
**Created:** [July 16, 2021, 8:50am UTC](https://discuss.elastic.co/t/script-query-is-not-returning-whole-double-value/278871 "2021-07-16T08:50:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![RamPrasadKM](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramprasadkm/32/80244_2.png) [@RamPrasadKM](https://discuss.elastic.co/u/RamPrasadKM)
#### Post date: [July 16, 2021, 8:50am UTC](https://discuss.elastic.co/t/script-query-is-not-returning-whole-double-value/278871/1 "2021-07-16T08:50:07Z")

</div>

POST gs011\_carea\_area/\_search  
{  
"from": 0,  
"size": 0,  
"version": true,  
"aggregations": {  
"filters": {  
"filter": {  
"bool": {  
"must": [  
{  
"terms": {  
"id": [  
76701  
],  
"boost": 1  
}  
}  
],  
"adjust\_pure\_negative": true,  
"boost": 1  
}  
},  
"aggregations": {  
"DB\_PLOTS": {  
"terms": {  
"script": {  
"source": "doc.area\_count.value",  
"lang": "painless"  
},  
"size": 1000000,  
"min\_doc\_count": 1,  
"shard\_min\_doc\_count": 0,  
"show\_term\_doc\_count\_error": false,  
"order": [  
{  
"\_count": "desc"  
},  
{  
"\_key": "asc"  
}  
]  
}  
}  
}  
}  
}  
}  
I suppose to get resposne as 3.92... but it is returning me 3 as result  
Can you please help me

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [July 19, 2021, 9:50am UTC](https://discuss.elastic.co/t/script-query-is-not-returning-whole-double-value/278871/2 "2021-07-19T09:50:26Z")

</div>

Hey,

first, please use markdown to format your code and code snippets. This will make everything much more readable and increase the chances of a reply.

second, please provide a **fully reproducible** example including index creation/mapping, document indexing and then the query, otherwise it is almost impossible to follow the steps and assumptions you had (like getting a 3.92 response).

Thanks!

---

<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 16, 2021, 9:51am UTC](https://discuss.elastic.co/t/script-query-is-not-returning-whole-double-value/278871/3 "2021-08-16T09:51:06Z")

</div>

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