This change sets the Faraday adapter used for ElasticSearch to `:net_http`.
The `elasticsearch-transport` gem tries to auto detect a suitable Faraday
adapter. Mastodon uses the Faraday default adapter of `:net_http`, but since
`elasticsearch-transport` sees that the `httpclient` gem is available it lets
Faraday use that one. Unfortunately `httpclient` does not properly clean up
its connections, leading to a lot of established connections to ElasticSearch
over time.
See also: e074fcff9b/lib/elastic/transport/client.rb (L291-L304)
(https://github.com/mastodon/mastodon/pull/27138)
It's possible that after commit callbacks were not firing when
exceptions occurred in the process. Also, the default Sidekiq
strategy does not push indexing jobs immediately, which is not
necessary and could be part of the issue too.
* Add full-text search for authorized statuses
- Search API will return statuses that match the query
- Only for logged in users
- Only if you are author of the status,
- Or you were mentioned in it
- Or you favourited or reblogged it
- Configuration over `ES_ENABLED`, `ES_HOST`, `ES_PORT`, `ES_PREFIX`
- Run `rails chewy:deploy` to create & populate index
Fix#5880Fix#4293Fix#1152
* Add commented out docker-compose configuration for ES container
* Optimize index import, filter search results
* Add basic normalization to the index
* Add better stemming and normalization to the index
* Skip webfinger request if search query includes both @ and a space
* Fix code style
* Visually separate search result sections
* Fix code style issues