# Ignore mask characters in search

**URL:** <https://discuss.elastic.co/t/ignore-mask-characters-in-search/21039>\
**Category:** Elasticsearch\
**Created:** [December 2, 2014, 6:19pm UTC](https://discuss.elastic.co/t/ignore-mask-characters-in-search/21039 "2014-12-02T18:19:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diogo\_Pineda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/diogo_pineda/32/8212_2.png) [@Diogo\_Pineda](https://discuss.elastic.co/u/Diogo_Pineda)\
**Post date:** [December 2, 2014, 6:19pm UTC](https://discuss.elastic.co/t/ignore-mask-characters-in-search/21039/1 "2014-12-02T18:19:46Z")

</div>

Need to store some fields with a kind of mask and perform searches with the  
mask and without it.  
For example, store a field of type "123456-45".  
I want this value to be returned to fetch both "12345" as "123.4" or "6-45".  
I always know what the characters to be ignored when mapping, but not in  
the search.  
What type of analyzer I could use? And how to map?  
Thank you

--  
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/67593087-fb84-48cf-9156-631260c00768%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/67593087-fb84-48cf-9156-631260c00768%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:46am UTC](https://discuss.elastic.co/t/ignore-mask-characters-in-search/21039/2 "2017-07-06T00:46:31Z")

</div>

Closed on July 6, 2017, 12:46am UTC


