# Search sas you type working great, but I need fuzziness / misspell correction

**URL:** <https://discuss.elastic.co/t/search-sas-you-type-working-great-but-i-need-fuzziness-misspell-correction/312729>\
**Category:** Elasticsearch\
**Created:** [August 23, 2022, 5:41pm UTC](https://discuss.elastic.co/t/search-sas-you-type-working-great-but-i-need-fuzziness-misspell-correction/312729 "2022-08-23T17:41:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pthreat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pthreat/32/64966_2.png) [@pthreat](https://discuss.elastic.co/u/pthreat)\
**Post date:** [August 23, 2022, 5:41pm UTC](https://discuss.elastic.co/t/search-sas-you-type-working-great-but-i-need-fuzziness-misspell-correction/312729/1 "2022-08-23T17:41:39Z")

</div>

This works great, however, I want to also be able to handle mistypes  
such as pish or fish, should match phish:

My Query:

```auto
{
    "from": 0,
    "size": 5,
    "sort": [
        {
            "date": {
                "order": "asc"
            }
        }
    ],
    "query": {
        "bool": {
            "must": [
                {
                    "match_phrase_prefix": {
                        "text": {
                            "query": "phish",
                            "slop": 20
                        }
                    }
                },
                {
                    "match": {
                        "type": "performer"
                    }
                }
            ],
            "must_not": [
                {
                    "bool": {
                        "should": [
                            {
                                "exists": {
                                    "field": "date"
                                }
                            }
                        ],
                        "must": [
                            {
                                "range": {
                                    "date": {
                                        "lte": "2022-08-23"
                                    }
                                }
                            }
                        ]
                    }
                }
            ]
        }
    }

```

My mapping:

```auto
{
    "id": {
        "type": "long"
    },
    "type": {
        "type": "keyword",
        "ignore_above": 32766
    },
    "text": {
        "type": "search_as_you_type"
    },
    "image":{
        "type": "text"
    },
    "date": {
        "type": "date",
        "format": "strict_date"
    }
}

```

---

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [August 23, 2022, 6:04pm UTC](https://discuss.elastic.co/t/search-sas-you-type-working-great-but-i-need-fuzziness-misspell-correction/312729/2 "2022-08-23T18:04:20Z")

</div>

Hi @pthreat

I believe that not be possible. Read this [issue git](https://github.com/elastic/elasticsearch/issues/56229#issuecomment-629169798).

---

<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:** [September 20, 2022, 6:04pm UTC](https://discuss.elastic.co/t/search-sas-you-type-working-great-but-i-need-fuzziness-misspell-correction/312729/3 "2022-09-20T18:04:28Z")

</div>

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