# These methods are available as Elastics.(variable_hash) # you can get the updated full reference and usage example of these methods # by just doing in the console: # Elastics.doc #-----------------------------------------------------------------------------# ### Aliases ### # http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases/ # this is the generic interface allowing all options # you must pass the aliases API structure as :data variable post_index_aliases: - POST - /_aliases - actions: <> get_index_aliases: - GET - /<>/_aliases # this is the single index alias # you can pass other options as :data variable put_index_alias: - PUT - /<>/_alias/<> delete_index_alias: - DELETE - /<>/_alias/<> get_index_alias: - GET - /<>/_alias/<> #-----------------------------------------------------------------------------# ### Analyze ### # http://www.elasticsearch.org/guide/reference/api/admin-indices-analyze/ # you can pass the text to analyze as the :data variable (or the param :text) # you can pass the parameters as the :params variable analyze_index: - GET - /<>/_analyze #-----------------------------------------------------------------------------# ### Create Index ### # http://www.elasticsearch.org/guide/reference/api/admin-indices-create-index.html put_index: &create - PUT - /<> - settings: number_of_shards: <> number_of_replicas: <> # aliased create_index: *create post_index: - POST - /<> - settings: number_of_shards: <> number_of_replicas: <> #-----------------------------------------------------------------------------# ### Delete Index ### # http://www.elasticsearch.org/guide/reference/api/delete.html delete_index: - DELETE - /<> #-----------------------------------------------------------------------------# ### Open/Close Index ### # http://www.elasticsearch.org/guide/reference/api/admin-indices-open-close/ close_index: - POST - /<>/_close open_index: - POST - /<>/_open #-----------------------------------------------------------------------------# ### Get Settings ### # http://www.elasticsearch.org/guide/reference/api/admin-indices-get-settings.html get_index_settings: &get_index_settings - GET - /<>/_settings # alias get_settings: *get_index_settings # you should pass the settings structure as the :data variable put_index_settings: - PUT - /<>/_settings #-----------------------------------------------------------------------------# ### Get Mappings ### # http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping.html get_index_mapping: &get_index_mapping - GET - /<>/<>/_mapping # alias get_mapping: *get_index_mapping #-----------------------------------------------------------------------------# ### Put Mappings ### # http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping.html put_index_mapping: &put_index_mapping - PUT - /<>/<>/_mapping - <>: properties: <> # alias put_mapping: *put_index_mapping #-----------------------------------------------------------------------------# ### Delete Mappings ### # http://www.elasticsearch.org/guide/reference/api/admin-indices-delete-mapping.html delete_index_mapping: &delete_index_mapping - DELETE - /<>/<> # alias delete_mapping: *delete_index_mapping #-----------------------------------------------------------------------------# ### Refresh ### # http://www.elasticsearch.org/guide/reference/api/admin-indices-refresh.html refresh_index: - POST - /<>/_refresh #-----------------------------------------------------------------------------# ### Optimize ### # http://www.elasticsearch.org/guide/reference/api/admin-indices-optimize/ # you can pass the parameters as the :params variable optimize_index: - POST - /<>/_optimize #-----------------------------------------------------------------------------# ### Flush ### # http://www.elasticsearch.org/guide/reference/api/admin-indices-flush/ # you can pass the parameters as the :params variable flush_index: - POST - /<>/_flush #-----------------------------------------------------------------------------# ### Snapshot ### # http://www.elasticsearch.org/guide/reference/api/admin-indices-gateway-snapshot/ gateway_snapshot: - POST - /<>/_gateway/snapshot #-----------------------------------------------------------------------------# ### Update Settings ### # http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings/ # you can pass the settings structure as the :data variable update_index_settings: - PUT - /<>/_settings #-----------------------------------------------------------------------------# ### Templates ### # http://www.elasticsearch.org/guide/reference/api/admin-indices-templates/ # you must pass the data structure as :data variable put_index_template: - PUT - /_template/<