# Filter is not working while using @log\_group in AWS

**URL:** <https://discuss.elastic.co/t/filter-is-not-working-while-using-log-group-in-aws/203510>\
**Category:** Elasticsearch\
**Created:** [October 14, 2019, 6:45pm UTC](https://discuss.elastic.co/t/filter-is-not-working-while-using-log-group-in-aws/203510 "2019-10-14T18:45:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mfolivas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mfolivas/32/55804_2.png) [@mfolivas](https://discuss.elastic.co/u/mfolivas)\
**Post date:** [October 14, 2019, 6:45pm UTC](https://discuss.elastic.co/t/filter-is-not-working-while-using-log-group-in-aws/203510/1 "2019-10-14T18:45:45Z")

</div>

I need to be able to do a filter on the @log\_group but I get zero hits when doing it. When I do it with the filter, I do get hits. I figured that I am probably not this in this correct. The @log\_group is set to be:  
"@log\_group" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},

Below is my query:

GET /logs-2019.09.24/\_search  
{  
"query": {  
"bool": {  
"must": [  
{  
"bool": {  
"must": [  
{  
"match": {  
"event": "Incoming Event Requests:"  
}  
},  
{  
"match": {  
"@log\_group": "/aws/lambda/De-Lorean-prod-event-handler"  
}  
},  
{  
"match": {  
"@message": "101c5944-28a1-4827-b3c6-11349f58b809"  
}  
}  
]  
}  
}  
],  
"filter": {  
"term": {  
"@log\_group": "/aws/lambda/De-Lorean-prod-event-handler"  
}  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![mfolivas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mfolivas/32/55804_2.png) [@mfolivas](https://discuss.elastic.co/u/mfolivas)\
**Post date:** [October 14, 2019, 9:41pm UTC](https://discuss.elastic.co/t/filter-is-not-working-while-using-log-group-in-aws/203510/2 "2019-10-14T21:41:47Z")

</div>

The query that I want to do is exactly as in the Kibana saved code:  
{  
"index": "9bfc2e10-775d-11e9-b3aa-959aec02508a",  
"highlightAll": true,  
"version": true,  
"query": {  
"query": ""driveitaway" AND "Incoming Event Requests" AND "service-ended"",  
"language": "lucene"  
},  
"filter": [  
{  
"$state": {  
"store": "appState"  
},  
"meta": {  
"alias": null,  
"disabled": false,  
"index": "9bfc2e10-775d-11e9-b3aa-959aec02508a",  
"key": "@log\_group",  
"negate": false,  
"params": {  
"query": "/aws/lambda/De-Lorean-prod-event-handler",  
"type": "phrase"  
},  
"type": "phrase",  
"value": "/aws/lambda/De-Lorean-prod-event-handler"  
},  
"query": {  
"match": {  
"@log\_group": {  
"query": "/aws/lambda/De-Lorean-prod-event-handler",  
"type": "phrase"  
}  
}  
}  
}  
]  
}

---

<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:** [November 11, 2019, 9:41pm UTC](https://discuss.elastic.co/t/filter-is-not-working-while-using-log-group-in-aws/203510/3 "2019-11-11T21:41:53Z")

</div>

Closed on November 11, 2019, 9:41pm UTC

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