Search for product using fuzzy search

I have an index with +10k documents. If I use Kibana I can find every document without any issue.

Now I do perform the following query searching for "Golden":

GET /_search
{
    "query": {
        "fuzzy" : {
            "name" : {
                    "value" :         "Golden",
                    "boost" :         1.0,
                    "fuzziness" :     3,
                    "prefix_length" : 0,
                    "max_expansions": 100
            }
        }
    }
}

It is returing a variety of products, also some products with the name "Golden Toast" which I want to search in the next step. But if I change the value from "Golden" to "Golden Toast", I do not get any results:

GET /_search
{
    "query": {
        "fuzzy" : {
            "name" : {
                    "value" :         "Golden Toast",
                    "boost" :         1.0,
                    "fuzziness" :     3,
                    "prefix_length" : 0,
                    "max_expansions": 100
            }
        }
    }
}

That's the result if I am searching for "Golden Toast":

{
  "took": 3,
  "timed_out": false,
  "_shards": {
    "total": 13,
    "successful": 13,
    "failed": 0
  },
  "hits": {
    "total": 0,
    "max_score": null,
    "hits": []
  }
}

Again: if I search for "Golden", I get a bunch of products with the name value "Golden Toast" back.

Where is my mistake?

Thank you and best,

Marcel

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