Please note that the following is a request for comments/input. This is not a decision or definitive recommendation on Axim’s part.
DEPR-170 covers a move from Elasticsearch to OpenSearch, which was also discussed in these forums:
@regis suggested that we might use this opportunity to remove Elasticsearch (and by extension OpenSearch) altogether, pointing out their extremely high memory requirements:
Unfortunately, MySQL full text performance is lackluster, both in terms of result quality and performance when combining a field to be searched with other indexes (like a course). So we still need some search engine to fill that gap to maintain feature parity.
In a recent comment, @jmbowman stated his belief that Meilisearch would be a more promising long-term alternative:
From a future-looking perspective, I feel that Meilisearch would be a better search engine to integrate with. It’s MIT-licensed, blazing fast (implemented in Rust), much less resource-intensive than Elasticsearch, already fairly competitive with Algolia in many respects, has solid commercial support, and has pretty good Python support. There isn’t an authoritative Django package for it yet, but there are several packages and blog posts outlining how other people have used them together. It would be a gamble, but frankly it feels like it has more momentum than OpenSearch.
I’m unfortunately not likely to be able to help much with this for a while, so it’s going to be up to other people to pick a path forward. I just wanted to articulate that while OpenSearch looks at first like the easiest/safest path forward to solve the licensing problem, it’s actually harder than it looks and may not really set up Open edX for success in future search improvements.
I have not tested anything locally, but based on various blog posts, that resource usage difference is massive. This one shows Meilisearch using 1/10th the memory of Elasticsearch, this one at around 1/5th. (There’s even one claiming a 1/50th memory usage, though I suspect misconfiguration in that one.)
Elasticsearch to OpenSearch isn’t a drop-in replacement, and we will have to modify some code to use newer libraries. If we’re going through that effort anyway, should be consider a wholesale move to Meilisearch? It’s a less mature codebase, but it seems to be friendlier out of the box, it has compelling performance characteristics, and it has a much smaller memory footprint. It seems to be actively maintained and developed by an open-source friendly company. By the very unscientific measure that is GitHub stars, it also seems to have more developer excitement than OpenSearch.
The question is this: Is it worth delaying the Elasticsearch → OpenSearch migration in order to do discovery work around Meilisearch? Doing so might give us a more compelling long term search engine for the project, but it would further delay this long-running DEPR effort, and possibly threaten the timeline for new Studio course content search functionality currently scheduled for Redwood.
FYI to @feanil, @Diana_Huang, @braden, and @jristau1984 who have all recently commented on that DEPR.