# Wildcard-Filter on String

**URL:** <https://discuss.elastic.co/t/wildcard-filter-on-string/20789>\
**Category:** Elasticsearch\
**Created:** [November 17, 2014, 4:24pm UTC](https://discuss.elastic.co/t/wildcard-filter-on-string/20789 "2014-11-17T16:24:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![info\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/info_2/32/1110_2.png) [@info\_2](https://discuss.elastic.co/u/info_2)\
**Post date:** [November 17, 2014, 4:24pm UTC](https://discuss.elastic.co/t/wildcard-filter-on-string/20789/1 "2014-11-17T16:24:09Z")

</div>

Hey,

I have a problem with searching for a specific filename via wildcards.

You can find a test-script here:  
[https://gist.github.com/MakaHost/590cb90e3e1f67d64f91](https://gist.github.com/MakaHost/590cb90e3e1f67d64f91)

I expect to get the field I inserted, however it gets returned only when I  
search for '_' or 'pricesearch.g.js'. I tested it with other file-endings  
and seen varying results. '_.css' and '.png' for example works, while  
'_.js' and '_.php' does not.

Can anyone help me?

--  
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/e008e6c4-b196-4fb0-a22d-c764131deb92%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e008e6c4-b196-4fb0-a22d-c764131deb92%40googlegroups.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:49am UTC](https://discuss.elastic.co/t/wildcard-filter-on-string/20789/2 "2017-07-06T00:49:30Z")

</div>


