# Search documents present in same log file

**URL:** <https://discuss.elastic.co/t/search-documents-present-in-same-log-file/189745>\
**Category:** Elasticsearch\
**Created:** [July 10, 2019, 11:41am UTC](https://discuss.elastic.co/t/search-documents-present-in-same-log-file/189745 "2019-07-10T11:41:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yogendra\_Hada](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yogendra_hada/32/42335_2.png) [@Yogendra\_Hada](https://discuss.elastic.co/u/Yogendra_Hada)\
**Post date:** [July 10, 2019, 11:41am UTC](https://discuss.elastic.co/t/search-documents-present-in-same-log-file/189745/1 "2019-07-10T11:41:04Z")

</div>

Hello,

I have an ES cluster setup. We are using logstash to structure our log-lines and for ingesting into Elasticsearch.

We've got indexes with multiple fields out of which two are:-

> "syslog\_message" - {"type": text},  
> "log\_file\_name" - {"type": text}

I want to search for log files (distinct "log\_file\_name") that have either "abc" OR "xyz" present in the "syslog\_message" field.

How can I do that? I tried using different aggregations but got confused.

Also, is it possible to search using Kibana?

Thanks,  
Yogendra

---

<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 7, 2019, 11:41am UTC](https://discuss.elastic.co/t/search-documents-present-in-same-log-file/189745/2 "2019-08-07T11:41:06Z")

</div>

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