Skip to content

Instantly share code, notes, and snippets.

@ghilead
ghilead / create_es_combined_index.rake
Last active January 18, 2019 12:08
Rake task for collocating multiple models as types in a single index.
# A Rake tasks to facilitate importing data from your models into a common Elasticsearch index.
#
# All models should declare a common index_name, and a document_type:
#
# class Article
# include Elasticsearch::Model
#
# index_name 'app_scoped_index'
# document_type 'articles'
#