Elasticsaerch Query with exact match with stemmer apply

To fetch the exact match I have applied
Ex: keywords.keyword_values.keyword

mappings:

"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:

{
    "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

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