Mastodon server admins that asked me the patch to use Postgresql instead of ES:
https://github.com/gled-rs/mastodon/blob/master/FTS_NOES.md ( Untested but seems complete ).
PR welcome as usual if you want.
@charlag @smallsees @gled @cbowdon I don't know if the Chewy gem used in Mastodon handles this stuff, but other advantages of ES are things like homophones, diacritics, plurals, synonyms, "fuzzyness" (typos), stemming, etc., which get really hairy to do rolling your own searches in Postgres. That said, I'd like to see a simple database fulltext search as an option for those who have religious opinions about ES.
@cheesegrits @charlag @smallsees @gled @cbowdon it is not a 'religious' opinion thing. It is a question of segmenting admins with few resources out of the feature, and that is unacceptable. FTS with pg is as good as ES for the need, even for big instances. That was either a deliberate choice of lazyness and locking out as much as possible from having the feature or something more shady as ES real strength is big data analysis ( some processing done on the toot data other that searching ? ).
@gled @charlag @smallsees @cbowdon I run ES on three instances, all "small" (single user, handful of users and a couple of hundred). Other than some extra memory, it hasn't gobbled up resources - I had enough headroom on all three, all <= $20/month Digital Ocean droplets.
I didn't mean "religious" in a pejorative sense, just "concerns other than purely technical", such as worries that Something Shady might be going on. So absolutely, yes, I'd like to see a pure database option for this.
@cbowdon @charlag @smallsees @gled unless you want to do more than just searching toots, Pg is more than enough even if you have a big instance. We have FTS for months now on mastodon.host ( it started around June 2017 ) and I tried Sphinx, ES, lucene and Pgsql. We sticked with PG for performance and ease of use and have been running it since October 2017. I have instrumented heavily Mastodon, and search with PG is not an issue at all. There are other elements taking more resources.
I know larger instances use it too and it seems to work fine. It means I don't need to deploy ES with the associated cost. I think for most people there is no reason at all to use ES for Mastodon, just use the postgresql FTS.