# Query in Elastic Search

**URL:** <https://discuss.elastic.co/t/query-in-elastic-search/193470>\
**Category:** Elasticsearch\
**Created:** [August 2, 2019, 7:38am UTC](https://discuss.elastic.co/t/query-in-elastic-search/193470 "2019-08-02T07:38:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Palak\_Agarwal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/palak_agarwal/32/46105_2.png) [@Palak\_Agarwal](https://discuss.elastic.co/u/Palak_Agarwal)\
**Post date:** [August 2, 2019, 7:38am UTC](https://discuss.elastic.co/t/query-in-elastic-search/193470/1 "2019-08-02T07:38:11Z")

</div>

Hi,  
Can you please tell me how to do the mapping in Elastic Search ? I am facing issue in doing visualization in Kibana .

I am having the following mapping in my application:

PUT /error\_radius\_stats  
{  
"mappings": {  
"_doc": {  
"properties": {  
"report\_date":{  
"type": "date",  
"format": "yyyy-MM-dd"  
},  
"Error Radius Distribution": {  
"properties": {  
"Range": {  
"properties": {  
"0-50": {  
"properties": {  
"Count": {  
"type": "long"  
},  
"Percentage": {  
"type": "float"  
}  
}  
},  
"100-200": {  
"properties": {  
"Count": {  
"type": "long"  
},  
"Percentage": {  
"type": "float"  
}  
}  
},  
"1000-2000": {  
"properties": {  
"Count": {  
"type": "long"  
},  
"Percentage": {  
"type": "float"  
}  
}  
},  
"200-300": {  
"properties": {  
"Count": {  
"type": "long"  
},  
"Percentage": {  
"type": "float"  
}  
}  
},  
"300-400": {  
"properties": {  
"Count": {  
"type": "long"  
},  
"Percentage": {  
"type": "float"  
}  
}  
},  
"400-500": {  
"properties": {  
"Count": {  
"type": "long"  
},  
"Percentage": {  
"type": "float"  
}  
}  
},  
"50-100": {  
"properties": {  
"Count": {  
"type": "long"  
},  
"Percentage": {  
"type": "float"  
}  
}  
},  
"500-1000": {  
"properties": {  
"Count": {  
"type": "long"  
},  
"Percentage": {  
"type": "float"  
}  
}  
},  
"\>2000": {  
"properties": {  
"Count": {  
"type": "float"  
},  
"Percentage": {  
"type": "long"  
}  
}  
},  
"Predicted error\_radius": {  
"properties": {  
"Count": {  
"type": "long"  
},  
"Percentage": {  
"type": "float"  
}  
}  
},  
"Total wbns": {  
"properties": {  
"Count": {  
"type": "long"  
}  
}  
},  
"error\_radius_-1": {  
"properties": {  
"Count": {  
"type": "long"  
},  
"Percentage": {  
"type": "float"  
}  
}  
}  
}  
}  
}  
}  
}  
}  
}  
}

I want to visualize this apping in kibana using 'data\_table'. The table format which I want to have is below:

range | count | Percentage  
0-50 | "long" | "float value"  
50-100 | "long" | "float value"  
100-200 | "long" | "float value"  
200-300 | "long" | "float value"  
.  
.  
.  
.

But the table I am getting now is like:

0-50 (count) | 0-50% | 50-100(count) | 50-100% ........  
"long" |"float value"|"long" | "float value" ........

Basically I am getting the value row-wise. And I want the values column-wise.

Please help me out.

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 30, 2019, 7:49am UTC](https://discuss.elastic.co/t/query-in-elastic-search/193470/2 "2019-08-30T07:49:22Z")

</div>

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