# Query ES from a visualization plugin (without aggregation)

**URL:** <https://discuss.elastic.co/t/query-es-from-a-visualization-plugin-without-aggregation/73809>\
**Category:** Kibana\
**Created:** [February 3, 2017, 8:27am UTC](https://discuss.elastic.co/t/query-es-from-a-visualization-plugin-without-aggregation/73809 "2017-02-03T08:27:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![valereds](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@valereds](https://discuss.elastic.co/u/valereds)\
**Post date:** [February 3, 2017, 8:27am UTC](https://discuss.elastic.co/t/query-es-from-a-visualization-plugin-without-aggregation/73809/1 "2017-02-03T08:27:11Z")

</div>

Hi all,  
I'm trying to develop a new visualization as a plugin. When I make a request to ES (from the search bar at the top) and watch the 'esResponse' the hits array inside the response is empty, but is is incorrect.  
How is it possibile to have significat data in the ES response?  
Thank you

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [February 9, 2017, 5:15pm UTC](https://discuss.elastic.co/t/query-es-from-a-visualization-plugin-without-aggregation/73809/2 "2017-02-09T17:15:12Z")

</div>

hi @valereds ,

I believe you may have talked to a colleague about this in IRC (?). Just to be sure, a short follow up here:

In Kibana, all Visualizations run aggregation searches agains ES. This could explain why you see empty results, because the aggregations end up empty (e.g. the selected time-period does not contain any data, ...)

---

<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:** [March 9, 2017, 5:15pm UTC](https://discuss.elastic.co/t/query-es-from-a-visualization-plugin-without-aggregation/73809/3 "2017-03-09T17:15:42Z")

</div>

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