# The data store is normal, and the fuzzy search is empty？

**URL:** <https://discuss.elastic.co/t/the-data-store-is-normal-and-the-fuzzy-search-is-empty/315238>\
**Category:** Elasticsearch\
**Created:** [September 27, 2022, 6:55am UTC](https://discuss.elastic.co/t/the-data-store-is-normal-and-the-fuzzy-search-is-empty/315238 "2022-09-27T06:55:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kingsKangKang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kingskangkang/32/111323_2.png) [@kingsKangKang](https://discuss.elastic.co/u/kingsKangKang)\
**Post date:** [September 27, 2022, 6:55am UTC](https://discuss.elastic.co/t/the-data-store-is-normal-and-the-fuzzy-search-is-empty/315238/1 "2022-09-27T06:55:03Z")

</div>

I have a piece of data that says:

```auto
善恩康生物科技(苏州)有限公司

```

Field is：

```auto
{"name": {"type": "text","analyzer": "ik_max_word", "search_analyzer": "ik_smart" }}

```

My search statement is:

```auto
{"query":{"match_phrase":{"name":{"query":"善恩康"}}}}

```

return：

```auto
{
  "took": 2,
  "timed_out": false,
  "_shards": {
    "total": 4,
    "successful": 4,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
  "total": {
    "value": 0,
    "relation": "eq"
  },
  "max_score": null,
  "hits": []
  }
}

```

I tried using ID queries：

```auto
{"query":{"match":{"_id":{"query":"10419864"}}}}

```

return:

```auto
{
  "took": 2,
  "timed_out": false,
  "_shards": {
    "total": 4,
    "successful": 4,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
  "total": {
  " value": 1,
    "relation": "eq"
  },
  "max_score": 1,
  "hits": [
      {
        "_index": "enterprise",
        "_type": "_doc",
        "_id": "10419864",
        "_score": 1,
        "_source": {
        "alias_names": "善恩康",
        "name": "善恩康生物科技（苏州）有限公司",
        "status": 1,
      }
    }
    ]
  }
}

```

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 27, 2022, 7:53am UTC](https://discuss.elastic.co/t/the-data-store-is-normal-and-the-fuzzy-search-is-empty/315238/2 "2022-09-27T07:53:37Z")

</div>

Please do not post images of text as it is hard to read for many and impossible to copy and paste from if anyone tries to recreate the issue. Instead copy the text and add it to the thread properly formatted using the available tools.

What is the mapping of the field you are searching? How does the value in the document you indexed and expect to find tokenize? How does that compare to the tokenization of the query text?

---

<div class="post-metadata">

**Author:** ![kingsKangKang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kingskangkang/32/111323_2.png) [@kingsKangKang](https://discuss.elastic.co/u/kingsKangKang)\
**Post date:** [September 27, 2022, 8:12am UTC](https://discuss.elastic.co/t/the-data-store-is-normal-and-the-fuzzy-search-is-empty/315238/3 "2022-09-27T08:12:53Z")

</div>

Thanks for your reply!  
I've made changes and reposted it

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 27, 2022, 9:24am UTC](https://discuss.elastic.co/t/the-data-store-is-normal-and-the-fuzzy-search-is-empty/315238/4 "2022-09-27T09:24:17Z")

</div>

OK. You have a different analyzer at search and index time. Please run the respective strings with their respective analyzer through the analyze API and post the results. I do not know Chinese, but this should show why you are not getting a match.

---

<div class="post-metadata">

**Author:** ![kingsKangKang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kingskangkang/32/111323_2.png) [@kingsKangKang](https://discuss.elastic.co/u/kingsKangKang)\
**Post date:** [September 27, 2022, 10:46am UTC](https://discuss.elastic.co/t/the-data-store-is-normal-and-the-fuzzy-search-is-empty/315238/5 "2022-09-27T10:46:13Z")

</div>

I tried to specify the official participle "Standard" in the search. But I also got empty results:

```auto
{"query":{"match_phrase":{"name":{"query":"善恩康","analyzer":"standard"}}}}

```

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 27, 2022, 11:05am UTC](https://discuss.elastic.co/t/the-data-store-is-normal-and-the-fuzzy-search-is-empty/315238/6 "2022-09-27T11:05:45Z")

</div>

To resolve this you need to use the [analyze API](https://www.elastic.co/guide/en/elasticsearch/reference/8.4/indices-analyze.html). Have a look at the [examples here](https://www.elastic.co/guide/en/elasticsearch/reference/8.4/test-analyzer.html) as well.

---

<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:** [October 25, 2022, 11:06am UTC](https://discuss.elastic.co/t/the-data-store-is-normal-and-the-fuzzy-search-is-empty/315238/7 "2022-10-25T11:06:36Z")

</div>

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