Collation support?

I’m in charge of creating a complex search functionality for a production grade web portal.
I chose OpenSearch over Elasticsearch due to several reasons.

I got to a point where a requirement is to return the result sets in language-specific alphabetical order.
Reading through Elasticsearch documentation, I found a solution, ICU Analysis Plugin.
Here’s the problem, that’s Elasticsearch and OpenSearch plugin installation docs don’t mention any such or similar plugin.

So it leaves me wondering. Can language-specific alphabetical ordering of results even be achieved with OpenSearch? And is it truly fit for production use since that’s such a basic and frequent requirement?

I’m already heavily invested into OpenSearch and the mere though of having to change a search-engine due to the lack of such fundamental feature sure sounds painful, so any information or tips on how to implement such functionality with it would really sooth that pain.

Thank you in advance.

Hi @lukaromih -

I installed OpenSearch via our docker-compose method and also found that the api calls regarding ICU-analysis didn’t work. However, a quick perusing through github shows that the plugin does indeed exist.

Here’s how I got it working:

On each of your nodes (not your dashboards node), execute the command

/usr/share/opensearch/bin/opensearch-plugin install analysis-icu

And then restart your cluster. You should find that the queries using icu_collation_keyword should work just fine.

Nate

1 Like

@nateynate Thank you. I haven’t had the chance to try it out yet, but your simple and concise answer really soothed my frustration. Even more so as docker-compose is also my choice of running the services.

I wanted to make your solution more declerative in a way of building and running a custom image instead of imperatively running those commands inside already running OpenSearch containers (every time I spin them up) and found that it’s already documented in Customize the Docker image docs. The example there runs it in CLI though, whereas I’ll be using a combination of a custom Dockerfile and docker-compose.yml.

So the process of running OpenSearch with custom plugins inside containers itself seems to at least be documented. I consider the main culprit for confusion (for me and possibly other people in the future) the absence of the analysis-icu plugin (possibly others) from the table of available plugins or any other more appropriate place.

Does this warrant opening an issue on Github (OpenSearch documentation repo?) asking for documenting analysis-icu and any other currently undocumented plugins?

1 Like

This absolutely does warrant an issue - not because I think the community of developers will jump into action, but just filing the issue helps. Invariably someone will come by it and say, “Oh! I want that too!”

It’s a great way to let the contributors know what it is that you’re looking for, and it guides the advocacy team here on what kinds of content they may want to consider creating.

File away!

Nate