# Please help me to do a filtered query!

**URL:** <https://discuss.elastic.co/t/please-help-me-to-do-a-filtered-query/20833>\
**Category:** Elasticsearch\
**Created:** [November 19, 2014, 11:07am UTC](https://discuss.elastic.co/t/please-help-me-to-do-a-filtered-query/20833 "2014-11-19T11:07:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tchyzh](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@tchyzh](https://discuss.elastic.co/u/tchyzh)\
**Post date:** [November 19, 2014, 11:07am UTC](https://discuss.elastic.co/t/please-help-me-to-do-a-filtered-query/20833/1 "2014-11-19T11:07:13Z")

</div>

Hi Everyone! please advice me how return only specific value from a query:

Here's how my index looks like:

"{  
"\_index" : "logstash-2014.10.23",  
"\_type" : "mia\_worker-prod",  
"\_id" : "wLAyxPVRTeOXsl9mUk3iNw",  
"\_score" : 1,  
"\_source" : {  
"name" : "mia\_worker",  
"hostname" : "360prod-mia01",  
"pid" : 890,  
"resource" : "user\_timeline",  
"id" : "claim:17762896",  
"version" : "2014-10-23T13:34:08.817",  
"level" : 30,  
"msg" : "changed.complete",  
"time" : "2014-10-23T13:35:07.714Z",  
"v" : 0  
}"

I need a query that just returns a "level:30" value for my monitoring!  
Thank you in advance for your help!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/9e184169-a15b-40a1-b7a4-0756b8ab8c0e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9e184169-a15b-40a1-b7a4-0756b8ab8c0e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![tchyzh](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@tchyzh](https://discuss.elastic.co/u/tchyzh)\
**Post date:** [November 19, 2014, 12:15pm UTC](https://discuss.elastic.co/t/please-help-me-to-do-a-filtered-query/20833/2 "2014-11-19T12:15:00Z")

</div>

On Wednesday, 19 November 2014 13:07:13 UTC+2, [tch...@360incentives.com](mailto:tch...@360incentives.com)  
wrote:

> Hi Everyone! please advice me how return only specific value from a query:
> 
> Here's how my index looks like:
> 
> "{  
> "\_index" : "logstash-2014.10.23",  
> "\_type" : "mia\_worker-prod",  
> "\_id" : "wLAyxPVRTeOXsl9mUk3iNw",  
> "\_score" : 1,  
> "\_source" : {  
> "name" : "mia\_worker",  
> "hostname" : "360prod-mia01",  
> "pid" : 890,  
> "resource" : "user\_timeline",  
> "id" : "claim:17762896",  
> "version" : "2014-10-23T13:34:08.817",  
> "level" : 30,  
> "msg" : "changed.complete",  
> "time" : "2014-10-23T13:35:07.714Z",  
> "v" : 0  
> }"
> 
> I need a query that just returns a "level:30" value for my monitoring!  
> Thank you in advance for your help!

Please Please help!!!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/60a3cb44-51d0-47e7-ab6e-62d731c49712%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/60a3cb44-51d0-47e7-ab6e-62d731c49712%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [November 19, 2014, 8:15pm UTC](https://discuss.elastic.co/t/please-help-me-to-do-a-filtered-query/20833/3 "2014-11-19T20:15:45Z")

</div>

Try using Jorg's plugin:

> **[GitHub - jprante/elasticsearch-plugin-arrayformat: A plugin written in Groovy...](https://github.com/jprante/elasticsearch-plugin-arrayformat)**
>
> A plugin written in Groovy for Elasticsearch. Contribute to jprante/elasticsearch-plugin-arrayformat development by creating an account on GitHub.

--  
Ivan

On Wed, Nov 19, 2014 at 7:15 AM, [tchyzh@360incentives.com](mailto:tchyzh@360incentives.com) wrote:

> On Wednesday, 19 November 2014 13:07:13 UTC+2, [tch...@360incentives.com](mailto:tch...@360incentives.com)  
> wrote:
> 
> > Hi Everyone! please advice me how return only specific value from a query:
> > 
> > Here's how my index looks like:
> > 
> > "{  
> > "\_index" : "logstash-2014.10.23",  
> > "\_type" : "mia\_worker-prod",  
> > "\_id" : "wLAyxPVRTeOXsl9mUk3iNw",  
> > "\_score" : 1,  
> > "\_source" : {  
> > "name" : "mia\_worker",  
> > "hostname" : "360prod-mia01",  
> > "pid" : 890,  
> > "resource" : "user\_timeline",  
> > "id" : "claim:17762896",  
> > "version" : "2014-10-23T13:34:08.817",  
> > "level" : 30,  
> > "msg" : "changed.complete",  
> > "time" : "2014-10-23T13:35:07.714Z",  
> > "v" : 0  
> > }"
> > 
> > I need a query that just returns a "level:30" value for my monitoring!  
> > Thank you in advance for your help!
> 
> Please Please help!!!
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/60a3cb44-51d0-47e7-ab6e-62d731c49712%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/60a3cb44-51d0-47e7-ab6e-62d731c49712%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/60a3cb44-51d0-47e7-ab6e-62d731c49712%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/60a3cb44-51d0-47e7-ab6e-62d731c49712%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBP85Oqk7ozZJ2LG%3DGLqLa5UwpCB0igUV5%2BfRtBTifPKQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBP85Oqk7ozZJ2LG%3DGLqLa5UwpCB0igUV5%2BfRtBTifPKQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:48am UTC](https://discuss.elastic.co/t/please-help-me-to-do-a-filtered-query/20833/4 "2017-07-06T00:48:54Z")

</div>


