# ICU, collation, and numbers

**URL:** <https://discuss.elastic.co/t/icu-collation-and-numbers/36099>\
**Category:** Elasticsearch\
**Created:** [December 1, 2015, 9:23pm UTC](https://discuss.elastic.co/t/icu-collation-and-numbers/36099 "2015-12-01T21:23:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ericus1](https://avatars.discourse-cdn.com/v4/letter/e/edb3f5/32.png) [@Ericus1](https://discuss.elastic.co/u/Ericus1)\
**Post date:** [December 1, 2015, 9:23pm UTC](https://discuss.elastic.co/t/icu-collation-and-numbers/36099/1 "2015-12-01T21:23:40Z")

</div>

Just curious if anyone know if the ICU plugin has support for the proper sorting of numbers when in string format. I was playing around with it to use it to properly sort in a case-insensitive way, but wasn't sure if it provided a simple way to have numbers sorted properly, so for instance you get 40, 399, 401, instead of 399, 40, 401.

Thanks.

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [December 1, 2015, 10:47pm UTC](https://discuss.elastic.co/t/icu-collation-and-numbers/36099/2 "2015-12-01T22:47:11Z")

</div>

Yes, see this test [https://github.com/elastic/elasticsearch/blob/master/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/SimpleIcuCollationTokenFilterTests.java#L133-L149](https://github.com/elastic/elasticsearch/blob/master/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/SimpleIcuCollationTokenFilterTests.java#L133-L149)

---

<div class="post-metadata">

**Author:** ![Ericus1](https://avatars.discourse-cdn.com/v4/letter/e/edb3f5/32.png) [@Ericus1](https://discuss.elastic.co/u/Ericus1)\
**Post date:** [December 2, 2015, 12:34am UTC](https://discuss.elastic.co/t/icu-collation-and-numbers/36099/3 "2015-12-02T00:34:03Z")

</div>

Oh, I actually tried your plugin as well, btw. Unfortunately, some of our raw fields can be huge and I was running into over max size errors trying to process them using it. The ICU plugin seemed to work with the "ignore above" setting so I could avoid those, which was why I was focusing on it.

I'll look through that example and see if I can make it work, thanks a bunch.

edit: Yep, got it working. Does exactly what I need. Thanks for the reference.

---

<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:** [July 5, 2017, 11:34pm UTC](https://discuss.elastic.co/t/icu-collation-and-numbers/36099/4 "2017-07-05T23:34:08Z")

</div>


