# Elasticsearch Help

**URL:** <https://discuss.elastic.co/t/elasticsearch-help/374312>\
**Category:** Elasticsearch\
**Created:** [February 10, 2025, 2:43pm UTC](https://discuss.elastic.co/t/elasticsearch-help/374312 "2025-02-10T14:43:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![antmar9041](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antmar9041/32/141267_2.png) [@antmar9041](https://discuss.elastic.co/u/antmar9041)\
**Post date:** [February 10, 2025, 2:43pm UTC](https://discuss.elastic.co/t/elasticsearch-help/374312/1 "2025-02-10T14:43:37Z")

</div>

Hi  
I use Elasticsearch a lot in my job but I'm having a hard time trying to search for Windows paths in my data.

For example, I want to search for: C:\Users\user\downloads

I tried every type of search but I can't seem to get it. I escaped it, spaces, I even tried regex but I'm still unable to search for that path.

I am trying to search in the webui under "Discover"

TIA!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 10, 2025, 3:13pm UTC](https://discuss.elastic.co/t/elasticsearch-help/374312/2 "2025-02-10T15:13:00Z")

</div>

Welcome!

There are few things to check:

- What is the mapping for this field? Is it a `keyword` field?
- May be you need to use something like `C:\\Users\\user\\downloads` at query time?
- Also have a look at [Path hierarchy tokenizer | Elasticsearch Guide [8.17] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-pathhierarchy-tokenizer.html)

---

<div class="post-metadata">

**Author:** ![antmar9041](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antmar9041/32/141267_2.png) [@antmar9041](https://discuss.elastic.co/u/antmar9041)\
**Post date:** [February 10, 2025, 3:17pm UTC](https://discuss.elastic.co/t/elasticsearch-help/374312/3 "2025-02-10T15:17:21Z")

</div>

Yes it is a keyword field and called "ParentPath".

Can I do `ParentPath : "*Downloads*"`

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 10, 2025, 3:50pm UTC](https://discuss.elastic.co/t/elasticsearch-help/374312/4 "2025-02-10T15:50:11Z")

</div>

Yes with a path hierarchy tokenizer. This should be doable.  
Also with the default analyzer with a `text` field, searching for `Downloads` should work. No need for `*Downloads*`.

---

<div class="post-metadata">

**Author:** ![antmar9041](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antmar9041/32/141267_2.png) [@antmar9041](https://discuss.elastic.co/u/antmar9041)\
**Post date:** [February 10, 2025, 4:03pm UTC](https://discuss.elastic.co/t/elasticsearch-help/374312/5 "2025-02-10T16:03:09Z")

</div>

Thank you.

This is not working: ParentPath : User\Downloads

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 10, 2025, 4:26pm UTC](https://discuss.elastic.co/t/elasticsearch-help/374312/6 "2025-02-10T16:26:57Z")

</div>

Could you provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script is something anyone can **copy and paste in Kibana dev console** , click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

Have a look at the [Elastic Stack and Solutions Help · Forums and Slack | Elastic](https://elastic.co/community/help) page. It contains also lot of useful information on how to ask for help.

---

<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 10, 2025, 4:27pm UTC](https://discuss.elastic.co/t/elasticsearch-help/374312/7 "2025-03-10T16:27:21Z")

</div>

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