Elasticsearch: search relevent query using washbasin and fetch the result for wash basin related result

search documents have the value of

Doc 1

{
    "s_title": "washbasin"
}

Doc 2

{
    "s_title": "wash basin"
}

Doc 3

{
    "s_title": "wash and basin"
}

Doc 4

{
    "s_title": "wash basin tap"
}

Doc 5

{
    "s_title": "washbasin tap"
}

If am searching for washbasin or basinwash I should get the result of Doc 1, Doc 2, Doc 3, Doc 4, and Doc 5.

Query which I have used.

{
    "query": {
        "bool": {
            "should": [
                {
                    "match": {
                        "s_title": {
                            "query": "washbasin",
                            "boost": 1
                        }
                    }
                }
            ],
            "minimum_should_match": 1
        }
    }
}

Guide me with the same.

I don't think it's "possible" as is because there's barely no way to know where to "cut" the word into 2 tokens.

wash-basin would work out of the box though.

So some suggestions:

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