# Finding similiar products by name

**URL:** <https://discuss.elastic.co/t/finding-similiar-products-by-name/371656>\
**Category:** Elasticsearch\
**Created:** [December 8, 2024, 11:38pm UTC](https://discuss.elastic.co/t/finding-similiar-products-by-name/371656 "2024-12-08T23:38:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chung](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chung/32/49315_2.png) [@chung](https://discuss.elastic.co/u/chung)\
**Post date:** [December 8, 2024, 11:38pm UTC](https://discuss.elastic.co/t/finding-similiar-products-by-name/371656/1 "2024-12-08T23:38:11Z")

</div>

Gven a list of products and each is assign to some categories( `Mobile`, `Apple`, `iPhone`) assigned to it.

```plaintext
iPhone 16 Pro 6.3-inch display
iPhone 16 Pro Max 6.9-inch display
iPhone 16 6.1-inch display
iPhone 16 Plus 6.7-inch display
iPhone 15 6.1-inch display
iPhone 15 Plus 6.7-inch display
...some
...more
...samgsung

```

If the query is `iPhone 99 Edge 7.0-inch display` then my goal is to find the similar products by name and retrieve the categories assigned to them. So now the new iPhone automatically got assigned to the those categories( `Mobile`, `Apple`, `iPhone`).

The `name` field is with `type: keyword` and I believe I don't need too much fulltext searching functions this use case.

Should I be using `minimum_should_match`?

```json
GET /products/_search
{
  "query": {
     "bool": {
        "must":[
           {
           "query_string":{
              "query": "iPhone 99 Edge 7.0-inch display",
              "minimum_should_match": "70%"
           }
        }
      ]
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![Tortoise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tortoise/32/147587_2.png) [@Tortoise](https://discuss.elastic.co/u/Tortoise)\
**Post date:** [December 9, 2024, 5:15am UTC](https://discuss.elastic.co/t/finding-similiar-products-by-name/371656/2 "2024-12-09T05:15:15Z")

</div>

Hello,

I have couple of queries as per my understanding , could you please share below details :

1. Not sure if we can use minumum\_should\_match inside the must clause.
2. Please share current data & what is that you expect to extract.
3. You have said name is keyword but i do not see to be used anywhere in the query.

Thanks
