# Elasticsaerch Query with exact match with stemmer apply

**URL:** <https://discuss.elastic.co/t/elasticsaerch-query-with-exact-match-with-stemmer-apply/353675>\
**Category:** Elasticsearch\
**Created:** [February 20, 2024, 11:03am UTC](https://discuss.elastic.co/t/elasticsaerch-query-with-exact-match-with-stemmer-apply/353675 "2024-02-20T11:03:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohan\_T](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Mohan\_T](https://discuss.elastic.co/u/Mohan_T)\
**Post date:** [February 20, 2024, 11:03am UTC](https://discuss.elastic.co/t/elasticsaerch-query-with-exact-match-with-stemmer-apply/353675/1 "2024-02-20T11:03:40Z")

</div>

To fetch the exact match I have applied  
Ex: **keywords.keyword\_values.keyword**

mappings:

```auto
"keywords": {
    "type": "object",
    "enabled": True,
    "properties": {
        "keyword_values": {
            "type": "text",
            "analyzer": "synonym_stemmer_bad_words_analyzer",
            "fields": {
                "keyword": {
                    "type": "keyword"
                }
            }
        }
    }
}

```

**keywords.keyword\_values.keyword** exact match if am applying, stemmer is not getting applied.

Search Query:

```auto
{
    "query": {
        "bool": {
            "should": [
                {
                    "match": {
                        "keywords.keyword_values.keyword": {
                            "query": "flooring",
                            "operator": "AND",
                            "prefix_length": 0,
                            "max_expansions": 50,
                            "fuzzy_transpositions": "true",
                            "lenient": "false",
                            "zero_terms_query": "NONE",
                            "auto_generate_synonyms_phrase_query": "true",
                            "boost": 7
                        }
                    }
                }
            ],
            "minimum_should_match": "1"
        }
    }
}

```

if the exact match with **flooring** , **floors** , **floor** should come, not with the result with flooring marble and all

---

<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:** [March 19, 2024, 11:04am UTC](https://discuss.elastic.co/t/elasticsaerch-query-with-exact-match-with-stemmer-apply/353675/2 "2024-03-19T11:04:20Z")

</div>

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