# How can I reflect the results of kuromoji in the search results?

**URL:** <https://discuss.elastic.co/t/how-can-i-reflect-the-results-of-kuromoji-in-the-search-results/270475>\
**Category:** Elasticsearch\
**Created:** [April 18, 2021, 12:19am UTC](https://discuss.elastic.co/t/how-can-i-reflect-the-results-of-kuromoji-in-the-search-results/270475 "2021-04-18T00:19:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![111464](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111464/32/87252_2.png) [@111464](https://discuss.elastic.co/u/111464)\
**Post date:** [April 18, 2021, 12:19am UTC](https://discuss.elastic.co/t/how-can-i-reflect-the-results-of-kuromoji-in-the-search-results/270475/1 "2021-04-18T00:19:12Z")

</div>

I'm applying a standard analyzer and a kuromoji analyzer to one field.  
The version of Elasticsearch is 6.3.0.

```auto
PUT /test
{
  "mappings": {
    "docs": {
      "properties": {
        "body": {
          "type": "text",
          "fields": {
            "japanese_field": {
              "analyzer": "kuromoji",
              "type": "text"
            }
          }
        }
      }
    }
  }
}

```

Add the following record as an example.

```auto
PUT /test/docs/1
{
  "body" : "和田の本棚"
}

PUT /test/docs/2
{
  "body" : "令和元年"
}

```

query:

```auto
POST /test/_search
{
  "query": {
    "multi_match": {
      "query": "和田の日記",
      "fields": [
        "body.japanese_field",
        "body"
      ]
    }
  }
}

```

result:

```auto
{
  "took": 3,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": 2,
    "max_score": 0.8630463,
    "hits": [
      {
        "_index": "test",
        "_type": "docs",
        "_id": "1",
        "_score": 0.8630463,
        "_source": {
          "body": "和田の本棚が検出されました"
        }
      },
      {
        "_index": "test",
        "_type": "docs",
        "_id": "2",
        "_score": 0.2876821,
        "_source": {
          "body": "令和元年"
        }
      }
    ]
  }
}

```

## question

I don't want to hit result of "令和元年".  
Is there a way to prioritize the analyzer results of body.japanese\_field and display them in the search results?

```auto
GET /test/_analyze
{
  "field": "body.japanese_field",
  "text": "和田の本棚"
}

{
  "tokens": [
    {
      "token": "和田",
      "start_offset": 0,
      "end_offset": 2,
      "type": "word",
      "position": 0
    },
    {
      "token": "本棚",
      "start_offset": 3,
      "end_offset": 5,
      "type": "word",
      "position": 2
    }
  ]
}

```

## Reference information

```auto
GET /test/_analyze
{
  "field": "body",
  "text": "和田の本棚"
}

{
  "tokens": [
    {
      "token": "和",
      "start_offset": 0,
      "end_offset": 1,
      "type": "<IDEOGRAPHIC>",
      "position": 0
    },
    {
      "token": "田",
      "start_offset": 1,
      "end_offset": 2,
      "type": "<IDEOGRAPHIC>",
      "position": 1
    },
    {
      "token": "の",
      "start_offset": 2,
      "end_offset": 3,
      "type": "<HIRAGANA>",
      "position": 2
    },
    {
      "token": "本",
      "start_offset": 3,
      "end_offset": 4,
      "type": "<IDEOGRAPHIC>",
      "position": 3
    },
    {
      "token": "棚",
      "start_offset": 4,
      "end_offset": 5,
      "type": "<IDEOGRAPHIC>",
      "position": 4
    }
  ]
}

```

---

<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:** [May 16, 2021, 12:19am UTC](https://discuss.elastic.co/t/how-can-i-reflect-the-results-of-kuromoji-in-the-search-results/270475/2 "2021-05-16T00:19:32Z")

</div>

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