# Kuromoji\_tokenizer: sort clause does not seem to work for some specific character combinations

**URL:** <https://discuss.elastic.co/t/kuromoji-tokenizer-sort-clause-does-not-seem-to-work-for-some-specific-character-combinations/356173>\
**Category:** Elasticsearch\
**Tags:** eql-elastic-query-language\
**Created:** [March 26, 2024, 11:40am UTC](https://discuss.elastic.co/t/kuromoji-tokenizer-sort-clause-does-not-seem-to-work-for-some-specific-character-combinations/356173 "2024-03-26T11:40:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ajay\_Purohit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ajay_purohit/32/122428_2.png) [@Ajay\_Purohit](https://discuss.elastic.co/u/Ajay_Purohit)\
**Post date:** [March 26, 2024, 11:40am UTC](https://discuss.elastic.co/t/kuromoji-tokenizer-sort-clause-does-not-seem-to-work-for-some-specific-character-combinations/356173/1 "2024-03-26T11:40:35Z")

</div>

Query:

```auto
{
  "query": {
    "bool": {
    }
  },
  "sort": [
    {
      "attribute.sortable": {
        "order": "asc"
      }
    }
  ]
}

```

Results:

```auto
"hits": [
  {
    "_index": "example_1",
    "_type": "example_1",
    "_id": "A2Ff26qFaV",
    "_score": null,
    "_source": {
      "attributes": {
        "attribute": "サヨ",
      }
    },
    "sort": [
      "サヨ"
    ]
  },
  {
    "_index": "example_2",
    "_type": "example_2",
    "_id": "A2Ff26qFaV",
    "_score": null,
    "_source": {
      "attributes": {
        "attribute": "シヨ",
      }
    },
    "sort": [
      "シ"
    ]
  }
]

```

The sort is working on the characters in attribute field for `example_1` doc but not for `example_2` doc.

Observed this in 3 instances in total for these strings:

- `シヨ`
- `ヲシ`
- `シヲ`

---

<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 23, 2024, 11:40am UTC](https://discuss.elastic.co/t/kuromoji-tokenizer-sort-clause-does-not-seem-to-work-for-some-specific-character-combinations/356173/2 "2024-04-23T11:40:56Z")

</div>

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