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

**URL:** <https://discuss.elastic.co/t/elasticsearch-search-relevent-query-using-washbasin-and-fetch-the-result-for-wash-basin-related-result/356068>\
**Category:** Elasticsearch\
**Created:** [March 25, 2024, 4:27am UTC](https://discuss.elastic.co/t/elasticsearch-search-relevent-query-using-washbasin-and-fetch-the-result-for-wash-basin-related-result/356068 "2024-03-25T04:27:25Z")\
**Posts on this page:** 3\
**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:** [March 25, 2024, 4:27am UTC](https://discuss.elastic.co/t/elasticsearch-search-relevent-query-using-washbasin-and-fetch-the-result-for-wash-basin-related-result/356068/1 "2024-03-25T04:27:25Z")

</div>

search documents have the value of

**Doc 1**

```auto
{
    "s_title": "washbasin"
}

```

**Doc 2**

```auto
{
    "s_title": "wash basin"
}

```

**Doc 3**

```auto
{
    "s_title": "wash and basin"
}

```

**Doc 4**

```auto
{
    "s_title": "wash basin tap"
}

```

**Doc 5**

```auto
{
    "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.

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

```

Guide me with the same.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 25, 2024, 8:32am UTC](https://discuss.elastic.co/t/elasticsearch-search-relevent-query-using-washbasin-and-fetch-the-result-for-wash-basin-related-result/356068/2 "2024-03-25T08:32:33Z")

</div>

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:

- You can define a list of synonyms: [Search with synonyms | Elasticsearch Guide [8.12] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/search-with-synonyms.html)
- You can define a edge ngram token filter but this will probably generate also a lot of false positives: [Edge n-gram token filter | Elasticsearch Guide [8.12] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/analysis-edgengram-tokenfilter.html)
- You can try semantic search (vector search) to see if that would solve the use case: [Semantic search | Elasticsearch Guide [8.12] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/semantic-search.html)

---

<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:** [April 22, 2024, 8:32am UTC](https://discuss.elastic.co/t/elasticsearch-search-relevent-query-using-washbasin-and-fetch-the-result-for-wash-basin-related-result/356068/3 "2024-04-22T08:32:57Z")

</div>

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