# Making more specific queries match more specific things, with regard to punctuation

**URL:** <https://discuss.elastic.co/t/making-more-specific-queries-match-more-specific-things-with-regard-to-punctuation/40738>\
**Category:** Elasticsearch\
**Created:** [February 2, 2016, 1:59pm UTC](https://discuss.elastic.co/t/making-more-specific-queries-match-more-specific-things-with-regard-to-punctuation/40738 "2016-02-02T13:59:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arnaud\_lb](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@arnaud\_lb](https://discuss.elastic.co/u/arnaud_lb)\
**Post date:** [February 2, 2016, 1:59pm UTC](https://discuss.elastic.co/t/making-more-specific-queries-match-more-specific-things-with-regard-to-punctuation/40738/1 "2016-02-02T13:59:03Z")

</div>

How would you use elasticsearch such that if a punctuation character is present in a query, the query matches only if that character is present in the document. However, if the punctuation character is not present in the query, it would always match.

For example, with a document `discuss.elastic.co`, these queries would match: `"discuss.elastic.co"`, `"discuss elastic co"`.

And with a document `discuss elastic co`, only this query would match: `"discuss elastic co"`. The query `"discuss.elastic.co"` would not match because the document doesn't have the dots.

This makes more specific queries match more specific things.

Is it possible to do that with builtin tokenizers or existing plugins ?

---

<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 5, 2017, 11:19pm UTC](https://discuss.elastic.co/t/making-more-specific-queries-match-more-specific-things-with-regard-to-punctuation/40738/2 "2017-07-05T23:19:39Z")

</div>


