# Elastic Scoring for perfect match

**URL:** <https://discuss.elastic.co/t/elastic-scoring-for-perfect-match/228720>\
**Category:** Elasticsearch\
**Created:** [April 19, 2020, 10:44am UTC](https://discuss.elastic.co/t/elastic-scoring-for-perfect-match/228720 "2020-04-19T10:44:31Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [April 20, 2020, 10:09am UTC](https://discuss.elastic.co/t/elastic-scoring-for-perfect-match/228720/5 "2020-04-20T10:09:26Z")

</div>

> [@AndyS](#):
>
> If I understand correctly ".keyword" forces an exact match on the entire field

`.keyword` sub field is generated at index time behind the scene by Elasticsearch with the default mapping. It creates a `.keyword` sub field which has the type `keyword`. Which means that it is indexed exactly as it has been provided = no transformation.

If you search within this field, indeed only exact matches will work.

> Is it possible to force an exact match using a substring?

Not sure. May be with match phrase query but on a text field. It should guarantee at least the positions of the tokens if this is what you are after.

But your example seems theorical, right? May be share 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.

---

_[View the full topic](https://discuss.elastic.co/t/elastic-scoring-for-perfect-match/228720)._
