# Search for the logs till specific pattern in Kibana 5.x

**URL:** <https://discuss.elastic.co/t/search-for-the-logs-till-specific-pattern-in-kibana-5-x/81349>\
**Category:** Kibana\
**Created:** [April 5, 2017, 5:23pm UTC](https://discuss.elastic.co/t/search-for-the-logs-till-specific-pattern-in-kibana-5-x/81349 "2017-04-05T17:23:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aakansha](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@Aakansha](https://discuss.elastic.co/u/Aakansha)\
**Post date:** [April 5, 2017, 5:23pm UTC](https://discuss.elastic.co/t/search-for-the-logs-till-specific-pattern-in-kibana-5-x/81349/1 "2017-04-05T17:23:23Z")

</div>

I have been using ELK Stack and I send some various logs of different components to the Kibana under same index. I want to search data till some specific pattern. I tried using regex but that didn't work.

Ex:  
Logs: (field name: request)  
/v3.0/customers/abcd-efg-hij/sites/abcd-efg-hij/nodes  
/v3.0/customers/abcd-efg-hij/sites/abcd-efg-hij/nodes/limit/1  
/v3.0/customers/abcd-efg-hij/sites/abcd-efg-hij/nodes/details  
/v3.0/customers/abcd-efg-hij/sites/abcd-efg-hij/nodes

Now in Kibana I want to search only for those logs that are till nodes. So the count should return '2' not 4

I used this regex pattern:  
request:/.\*nodes$/  
But this returns all 4 whereas it should have returned 2(/v3.0/customers/abcd-efg-hij/sites/abcd-efg-hij/nodes)

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [April 5, 2017, 11:22pm UTC](https://discuss.elastic.co/t/search-for-the-logs-till-specific-pattern-in-kibana-5-x/81349/2 "2017-04-05T23:22:53Z")

</div>

I would recommend using the [path hierarchy tokenizer](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-pathhierarchy-tokenizer.html) on this field.

---

<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:** [May 3, 2017, 11:22pm UTC](https://discuss.elastic.co/t/search-for-the-logs-till-specific-pattern-in-kibana-5-x/81349/3 "2017-05-03T23:22:56Z")

</div>

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