Elasticfusion provides additional functionality on top of elasticsearch-rails.
- a keyword-based case-insensitive search engine supporting boolean expressions (conjunction, disjunction, negation) and field queries (range);
- background jobs to carry out index updates.
It was written with a specific use case in mind and as such places a
number of restrictions on the allowed use of Elasticsearch.
For instance, partial updates are not supported, and
in general is encouraged to be disabled.
- Rails 5
- Elasticsearch 5
Place your index definitions in app/indexes directory.
Elasticfusion.load_index_definitionsin app/models/application_record.rb (or any autoloaded file, really).
indexingqueue to your Active Job backend.
Elasticfusion was written specifically for fanuniverse. Refer to it for real-world usage examples.
This gem was largely inspired by search handling in booru-on-rails (Derpibooru).