# Beginner's question: matching field names exactly (or containing a substring)

**URL:** <https://discuss.elastic.co/t/beginners-question-matching-field-names-exactly-or-containing-a-substring/21797>\
**Category:** Elasticsearch\
**Created:** [January 23, 2015, 1:13pm UTC](https://discuss.elastic.co/t/beginners-question-matching-field-names-exactly-or-containing-a-substring/21797 "2015-01-23T13:13:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![r0b3rt](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@r0b3rt](https://discuss.elastic.co/u/r0b3rt)\
**Post date:** [January 23, 2015, 1:13pm UTC](https://discuss.elastic.co/t/beginners-question-matching-field-names-exactly-or-containing-a-substring/21797/1 "2015-01-23T13:13:52Z")

</div>

hello everybody!

i'm kinda new to elasticsearch and just entered this group. i started using  
it some months ago on my work and trying to get deeper into all this stuff.

i wondered if it is possible to do elasticsearch queries where i can match  
names of fields and not values of fields.

in my case, i have a very large data model i am storing in elasticsearch  
with lots of field names with same suffixes.  
i would like to know if I can query elasticsearch to give me a result with  
all documents containing all fields ending with "\_xyz" and their values of  
course.  
i know i could do a simple query where i just write all the field names  
explicitly, but i am curious if i could save time (and spent the saved time  
here to ask this question...)

thank you all 😉

robert

--  
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/42dca496-5195-43fd-a755-375d691ecec0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/42dca496-5195-43fd-a755-375d691ecec0%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:37am UTC](https://discuss.elastic.co/t/beginners-question-matching-field-names-exactly-or-containing-a-substring/21797/2 "2017-07-06T00:37:03Z")

</div>


