philomena/lib/philomena/elasticsearch_index.ex
liamwhite 6bbe358dd1
Elasticsearch 7 upgrade (#113)
* initial upgrade to elasticsearch 7

* fix stat page error

* i am an idiot

* fix es not creating new indexes

* more complete removal of doc_type

Co-authored-by: Luna D <cod7777@yandex.ru>
2020-05-04 08:19:42 -04:00

12 lines
395 B
Elixir

defmodule Philomena.ElasticsearchIndex do
# Returns the index name for the index.
# This is usually a collection name like "images".
@callback index_name() :: String.t()
# Returns the mapping and settings for the index.
@callback mapping() :: map()
# Returns the JSON representation of the given struct
# for indexing in Elasticsearch.
@callback as_json(struct()) :: map()
end