# Exact match possible when using More Like This Query (MLT)?

**URL:** <https://discuss.elastic.co/t/exact-match-possible-when-using-more-like-this-query-mlt/92533>\
**Category:** Elasticsearch\
**Created:** [July 10, 2017, 9:19pm UTC](https://discuss.elastic.co/t/exact-match-possible-when-using-more-like-this-query-mlt/92533 "2017-07-10T21:19:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![west415](https://avatars.discourse-cdn.com/v4/letter/w/919ad9/32.png) [@west415](https://discuss.elastic.co/u/west415)\
**Post date:** [July 10, 2017, 9:19pm UTC](https://discuss.elastic.co/t/exact-match-possible-when-using-more-like-this-query-mlt/92533/1 "2017-07-10T21:19:08Z")

</div>

I'm using ElasticSearch 5.4.3 I'm trying to put together a "more like this" type search query, but wondering is there a way to do an exact match? Here is my code which works, but it treats the "like" value as individual words and I'd like to treat the "like" value as an exact value similar to how match phrase works. Is this possible?

In the below code I'd like the like value to be treated as "Java Developer" not "java" or "developer" which is what it appears to be doing based on the results I'm getting back.

```
GET /myindex/mytype/_search
{
    "query": {
        "more_like_this" : {
            "fields" : ["job_title"],
            "like" : "Java Developer",
            "min_term_freq" : 1,
            "max_query_terms" : 12
        }
    }
}
```

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [July 11, 2017, 9:29am UTC](https://discuss.elastic.co/t/exact-match-possible-when-using-more-like-this-query-mlt/92533/2 "2017-07-11T09:29:07Z")

</div>

if you want an exact match, why not executing a regular `match` or `term` query against `job_title.keyword`? No need for MLT..

---

<div class="post-metadata">

**Author:** ![west415](https://avatars.discourse-cdn.com/v4/letter/w/919ad9/32.png) [@west415](https://discuss.elastic.co/u/west415)\
**Post date:** [July 11, 2017, 10:15pm UTC](https://discuss.elastic.co/t/exact-match-possible-when-using-more-like-this-query-mlt/92533/3 "2017-07-11T22:15:36Z")

</div>

Yes, that's fair enough. I guess I got caught up in the term "More like this" and assumed I needed that functionality. Thanks for helping me not over engineer.

---

<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:** [August 8, 2017, 10:15pm UTC](https://discuss.elastic.co/t/exact-match-possible-when-using-more-like-this-query-mlt/92533/4 "2017-08-08T22:15:40Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
