Elastic v2.3.5 Elastic.Index

Summary

Functions

Deletes the specified index. If you’ve configured index_prefix and use_mix_env for Elastic, it will use those

Checks if the specified index exists. The index name will be automatically prefixed as per this package’s configuration

Helper method for getting the name of an index combined with the index_prefix and mix_env configuration

Refreshes the specified index by issuing a refresh HTTP call

Functions

delete(index)

Deletes the specified index. If you’ve configured index_prefix and use_mix_env for Elastic, it will use those.

Examples

# With index_prefix set to 'elastic'
# And with `use_mix_env` set to `true`
# This will delete the `elastic_dev_answer` index
Elastic.Index.delete("answer")
exists?(index)

Checks if the specified index exists. The index name will be automatically prefixed as per this package’s configuration.

name(index)

Helper method for getting the name of an index combined with the index_prefix and mix_env configuration.

refresh(index)

Refreshes the specified index by issuing a refresh HTTP call.