elastics-client 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +20 -0
- data/README.md +28 -0
- data/VERSION +1 -0
- data/elastics-client.gemspec +33 -0
- data/lib/elastics.rb +108 -0
- data/lib/elastics/api_stubs.rb +1268 -0
- data/lib/elastics/api_templates/cluster_api.yml +94 -0
- data/lib/elastics/api_templates/core_api.yml +202 -0
- data/lib/elastics/api_templates/indices_api.yml +304 -0
- data/lib/elastics/class_proxy/base.rb +29 -0
- data/lib/elastics/class_proxy/templates.rb +97 -0
- data/lib/elastics/class_proxy/templates/doc.rb +91 -0
- data/lib/elastics/class_proxy/templates/search.rb +72 -0
- data/lib/elastics/configuration.rb +25 -0
- data/lib/elastics/deprecation.rb +153 -0
- data/lib/elastics/errors.rb +43 -0
- data/lib/elastics/http_clients/base.rb +15 -0
- data/lib/elastics/http_clients/loader.rb +51 -0
- data/lib/elastics/http_clients/patron.rb +29 -0
- data/lib/elastics/http_clients/rest_client.rb +36 -0
- data/lib/elastics/logger.rb +37 -0
- data/lib/elastics/prog_bar.rb +39 -0
- data/lib/elastics/rails.rb +1 -0
- data/lib/elastics/result.rb +24 -0
- data/lib/elastics/result/bulk.rb +20 -0
- data/lib/elastics/result/document.rb +67 -0
- data/lib/elastics/result/multi_get.rb +24 -0
- data/lib/elastics/result/search.rb +28 -0
- data/lib/elastics/struct/array.rb +25 -0
- data/lib/elastics/struct/hash.rb +105 -0
- data/lib/elastics/struct/paginable.rb +58 -0
- data/lib/elastics/struct/prunable.rb +60 -0
- data/lib/elastics/struct/symbolize.rb +27 -0
- data/lib/elastics/tasks.rb +62 -0
- data/lib/elastics/template.rb +124 -0
- data/lib/elastics/template/common.rb +42 -0
- data/lib/elastics/template/logger.rb +66 -0
- data/lib/elastics/template/partial.rb +28 -0
- data/lib/elastics/template/search.rb +30 -0
- data/lib/elastics/template/slim_search.rb +13 -0
- data/lib/elastics/template/tags.rb +56 -0
- data/lib/elastics/templates.rb +20 -0
- data/lib/elastics/utility_methods.rb +131 -0
- data/lib/elastics/utils.rb +103 -0
- data/lib/elastics/variables.rb +62 -0
- data/lib/tasks.rake +28 -0
- metadata +148 -0
| @@ -0,0 +1,94 @@ | |
| 1 | 
            +
            # These methods are available as Elastics.<method>(variable_hash)
         | 
| 2 | 
            +
            # you can get the updated full reference and usage example of these methods
         | 
| 3 | 
            +
            # by just doing in the console:
         | 
| 4 | 
            +
            # Elastics.doc
         | 
| 5 | 
            +
             | 
| 6 | 
            +
             | 
| 7 | 
            +
             | 
| 8 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 9 | 
            +
            ### Health ###
         | 
| 10 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-cluster-health/
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            # you can pass the params as the :params variable
         | 
| 13 | 
            +
            cluster_health:
         | 
| 14 | 
            +
              - GET
         | 
| 15 | 
            +
              - /_cluster/health/<<index>>
         | 
| 16 | 
            +
             | 
| 17 | 
            +
             | 
| 18 | 
            +
             | 
| 19 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 20 | 
            +
            ### State ###
         | 
| 21 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-cluster-state/
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            # you can pass the params as the :params variable
         | 
| 24 | 
            +
            cluster_state:
         | 
| 25 | 
            +
              - GET
         | 
| 26 | 
            +
              - /_cluster/state
         | 
| 27 | 
            +
             | 
| 28 | 
            +
             | 
| 29 | 
            +
             | 
| 30 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 31 | 
            +
            ### Update Settings ###
         | 
| 32 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-cluster-update-settings/
         | 
| 33 | 
            +
             | 
| 34 | 
            +
            # you must pass the settings structure as the :data variable
         | 
| 35 | 
            +
            put_cluster_settings:
         | 
| 36 | 
            +
              - PUT
         | 
| 37 | 
            +
              - /_cluster/settings
         | 
| 38 | 
            +
             | 
| 39 | 
            +
            get_cluster_settings:
         | 
| 40 | 
            +
              - GET
         | 
| 41 | 
            +
              - /_cluster/settings
         | 
| 42 | 
            +
             | 
| 43 | 
            +
             | 
| 44 | 
            +
             | 
| 45 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 46 | 
            +
            ### Nodes Info ###
         | 
| 47 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-cluster-nodes-info/
         | 
| 48 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/
         | 
| 49 | 
            +
             | 
| 50 | 
            +
            # uses the _nodes shortcut
         | 
| 51 | 
            +
            cluster_nodes_info:
         | 
| 52 | 
            +
              - GET
         | 
| 53 | 
            +
              - /_nodes/<<nodes= ~ >>/<<endpoint= ~ >>
         | 
| 54 | 
            +
             | 
| 55 | 
            +
             | 
| 56 | 
            +
             | 
| 57 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 58 | 
            +
            ### Nodes Stats ###
         | 
| 59 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-cluster-nodes-stats/
         | 
| 60 | 
            +
             | 
| 61 | 
            +
            cluster_nodes_stats:
         | 
| 62 | 
            +
              - GET
         | 
| 63 | 
            +
              - /_nodes/<<nodes= ~ >>/stats/<<endpoint= ~ >>
         | 
| 64 | 
            +
             | 
| 65 | 
            +
             | 
| 66 | 
            +
             | 
| 67 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 68 | 
            +
            ### Nodes Shutdown ###
         | 
| 69 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-cluster-nodes-shutdown/
         | 
| 70 | 
            +
             | 
| 71 | 
            +
            cluster_nodes_shutdown:
         | 
| 72 | 
            +
              - POST
         | 
| 73 | 
            +
              - /_cluster/nodes/<<nodes= ~ >>/_shutdown
         | 
| 74 | 
            +
             | 
| 75 | 
            +
             | 
| 76 | 
            +
             | 
| 77 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 78 | 
            +
            ### Nodes Hot Threads ###
         | 
| 79 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-cluster-nodes-hot-threads/
         | 
| 80 | 
            +
             | 
| 81 | 
            +
            cluster_nodes_hot_threads:
         | 
| 82 | 
            +
              - GET
         | 
| 83 | 
            +
              - /_nodes/<<nodes= ~ >>/hot_threads
         | 
| 84 | 
            +
             | 
| 85 | 
            +
             | 
| 86 | 
            +
             | 
| 87 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 88 | 
            +
            ### Cluster Reroute ###
         | 
| 89 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-cluster-reroute.html
         | 
| 90 | 
            +
             | 
| 91 | 
            +
            # you must pass the data structure as the :data variable
         | 
| 92 | 
            +
            cluster_reroute:
         | 
| 93 | 
            +
              - POST
         | 
| 94 | 
            +
              - /_cluster/reroute
         | 
| @@ -0,0 +1,202 @@ | |
| 1 | 
            +
            # These methods are available as Elastics.<method>(variable_hash)
         | 
| 2 | 
            +
            # you can get the updated full reference and usage example of these methods
         | 
| 3 | 
            +
            # by just doing in the console:
         | 
| 4 | 
            +
            # Elastics.doc
         | 
| 5 | 
            +
             | 
| 6 | 
            +
             | 
| 7 | 
            +
             | 
| 8 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 9 | 
            +
            ### Index ###
         | 
| 10 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/index_/
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            # You must pass the :data variable
         | 
| 13 | 
            +
            store: &store
         | 
| 14 | 
            +
              - PUT
         | 
| 15 | 
            +
              - /<<index>>/<<type>>/<<id>>
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            # alias for symmetry with post_store
         | 
| 18 | 
            +
            put_store: *store
         | 
| 19 | 
            +
             | 
| 20 | 
            +
            # id is assigned by ES; you must pass :data
         | 
| 21 | 
            +
            post_store:
         | 
| 22 | 
            +
              - POST
         | 
| 23 | 
            +
              - /<<index>>/<<type>>
         | 
| 24 | 
            +
             | 
| 25 | 
            +
             | 
| 26 | 
            +
             | 
| 27 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 28 | 
            +
            ### Delete ###
         | 
| 29 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/delete/
         | 
| 30 | 
            +
             | 
| 31 | 
            +
            delete: &delete
         | 
| 32 | 
            +
              - DELETE
         | 
| 33 | 
            +
              - /<<index>>/<<type>>/<<id>>
         | 
| 34 | 
            +
             | 
| 35 | 
            +
            remove: *delete
         | 
| 36 | 
            +
             | 
| 37 | 
            +
             | 
| 38 | 
            +
             | 
| 39 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 40 | 
            +
            ### Get ###
         | 
| 41 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/get.html
         | 
| 42 | 
            +
             | 
| 43 | 
            +
            get:
         | 
| 44 | 
            +
              - GET
         | 
| 45 | 
            +
              - /<<index>>/<<type>>/<<id>>
         | 
| 46 | 
            +
             | 
| 47 | 
            +
            get_source:
         | 
| 48 | 
            +
              - GET
         | 
| 49 | 
            +
              - /<<index>>/<<type>>/<<id>>/_source
         | 
| 50 | 
            +
             | 
| 51 | 
            +
             | 
| 52 | 
            +
             | 
| 53 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 54 | 
            +
            ### Multi Get ###
         | 
| 55 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/multi-get.html
         | 
| 56 | 
            +
             | 
| 57 | 
            +
            multi_get:
         | 
| 58 | 
            +
              - GET
         | 
| 59 | 
            +
              - /<<index>>/<<type>>/_mget
         | 
| 60 | 
            +
              - ids: << ids >>
         | 
| 61 | 
            +
             | 
| 62 | 
            +
             | 
| 63 | 
            +
             | 
| 64 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 65 | 
            +
            ### Update ###
         | 
| 66 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/update/
         | 
| 67 | 
            +
             | 
| 68 | 
            +
            # you must pass script or doc and the other options as the :data variable
         | 
| 69 | 
            +
            update:
         | 
| 70 | 
            +
              - POST
         | 
| 71 | 
            +
              - /<<index>>/<<type>>/<<id>>/_update
         | 
| 72 | 
            +
             | 
| 73 | 
            +
             | 
| 74 | 
            +
             | 
| 75 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 76 | 
            +
            ### Search ###
         | 
| 77 | 
            +
            # The search api is covered by the templating system
         | 
| 78 | 
            +
             | 
| 79 | 
            +
             | 
| 80 | 
            +
             | 
| 81 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 82 | 
            +
            ### Multi Search ###
         | 
| 83 | 
            +
            # the Multi Search api is covered by the YourClass.multi_search method
         | 
| 84 | 
            +
            # added by the Elastics::Templates module
         | 
| 85 | 
            +
             | 
| 86 | 
            +
             | 
| 87 | 
            +
             | 
| 88 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 89 | 
            +
            ### Percolate ###
         | 
| 90 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/percolate.html
         | 
| 91 | 
            +
             | 
| 92 | 
            +
            # You must pass the the document (and additional queries) as :data variable
         | 
| 93 | 
            +
            percolate:
         | 
| 94 | 
            +
              - GET
         | 
| 95 | 
            +
              - /<<index>>/<<type>>/_percolate
         | 
| 96 | 
            +
             | 
| 97 | 
            +
            # You must pass the the query (and additional fields) as :data variable
         | 
| 98 | 
            +
            put_percolator:
         | 
| 99 | 
            +
              - PUT
         | 
| 100 | 
            +
              - /_percolator/<<index>>/<<percolator>>
         | 
| 101 | 
            +
             | 
| 102 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/percolate.html
         | 
| 103 | 
            +
            delete_percolator:
         | 
| 104 | 
            +
              - DELETE
         | 
| 105 | 
            +
              - /_percolator/<<index>>/<<percolator>>
         | 
| 106 | 
            +
             | 
| 107 | 
            +
             | 
| 108 | 
            +
             | 
| 109 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 110 | 
            +
            ### Bulk ###
         | 
| 111 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/bulk.html
         | 
| 112 | 
            +
             | 
| 113 | 
            +
            post_bulk_string: &bulk
         | 
| 114 | 
            +
              - POST
         | 
| 115 | 
            +
              - /_bulk
         | 
| 116 | 
            +
              - << bulk_string >>
         | 
| 117 | 
            +
             | 
| 118 | 
            +
            # Deprecated alias for backward compatibility
         | 
| 119 | 
            +
            bulk: *bulk
         | 
| 120 | 
            +
             | 
| 121 | 
            +
             | 
| 122 | 
            +
             | 
| 123 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 124 | 
            +
            ### Count ###
         | 
| 125 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/count.html
         | 
| 126 | 
            +
             | 
| 127 | 
            +
            count:
         | 
| 128 | 
            +
              - GET
         | 
| 129 | 
            +
              - /<<index>>/<<type>>/_count
         | 
| 130 | 
            +
              # pass :data structure if you need
         | 
| 131 | 
            +
             | 
| 132 | 
            +
             | 
| 133 | 
            +
             | 
| 134 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 135 | 
            +
            ### Delete by query ###
         | 
| 136 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/delete-by-query.html
         | 
| 137 | 
            +
             | 
| 138 | 
            +
            delete_by_query:
         | 
| 139 | 
            +
              - DELETE
         | 
| 140 | 
            +
              - /<<index>>/<<type>>/_query
         | 
| 141 | 
            +
              # pass :data variable query if you need
         | 
| 142 | 
            +
             | 
| 143 | 
            +
             | 
| 144 | 
            +
             | 
| 145 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 146 | 
            +
            ### More Like This ###
         | 
| 147 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/more-like-this.html
         | 
| 148 | 
            +
             | 
| 149 | 
            +
            # You can pass the search API (facets, from/to and so on) as :data variable
         | 
| 150 | 
            +
            more_like_this: &mlt
         | 
| 151 | 
            +
              - GET
         | 
| 152 | 
            +
              - /<<index>>/<<type>>/<<id>>/_mlt
         | 
| 153 | 
            +
             | 
| 154 | 
            +
            # aliased
         | 
| 155 | 
            +
            mlt: *mlt
         | 
| 156 | 
            +
             | 
| 157 | 
            +
             | 
| 158 | 
            +
             | 
| 159 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 160 | 
            +
            ### Validate ###
         | 
| 161 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/validate/
         | 
| 162 | 
            +
             | 
| 163 | 
            +
            # you must pass the query to validate as the :data variable
         | 
| 164 | 
            +
            # you can pass the parameters as the :params variable
         | 
| 165 | 
            +
            validate:
         | 
| 166 | 
            +
              - GET
         | 
| 167 | 
            +
              - /<<index>>/<<type>>/_validate/query
         | 
| 168 | 
            +
             | 
| 169 | 
            +
             | 
| 170 | 
            +
             | 
| 171 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 172 | 
            +
            ### Explain ###
         | 
| 173 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/explain/
         | 
| 174 | 
            +
             | 
| 175 | 
            +
            # you must pass the query to explain as the :data variable
         | 
| 176 | 
            +
            # you can pass the parameters as the :params variable
         | 
| 177 | 
            +
            explain:
         | 
| 178 | 
            +
              - GET
         | 
| 179 | 
            +
              - /<<index>>/<<type>>/<<id>>/_explain
         | 
| 180 | 
            +
             | 
| 181 | 
            +
             | 
| 182 | 
            +
             | 
| 183 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 184 | 
            +
            ### Elastics additions ###
         | 
| 185 | 
            +
             | 
| 186 | 
            +
            # not a real API method, but handy
         | 
| 187 | 
            +
            match_all:
         | 
| 188 | 
            +
              - GET
         | 
| 189 | 
            +
              - /<<index>>/<<type>>/_search
         | 
| 190 | 
            +
              - query:
         | 
| 191 | 
            +
                  match_all: {}
         | 
| 192 | 
            +
             | 
| 193 | 
            +
             | 
| 194 | 
            +
             | 
| 195 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 196 | 
            +
            # get a document without using the get API (which doesn't support fields '*')
         | 
| 197 | 
            +
            search_by_id:
         | 
| 198 | 
            +
              - GET
         | 
| 199 | 
            +
              - /<<index>>/<<type>>/_search
         | 
| 200 | 
            +
              - query:
         | 
| 201 | 
            +
                  term:
         | 
| 202 | 
            +
                    _id: <<id>>
         | 
| @@ -0,0 +1,304 @@ | |
| 1 | 
            +
            # These methods are available as Elastics.<method>(variable_hash)
         | 
| 2 | 
            +
            # you can get the updated full reference and usage example of these methods
         | 
| 3 | 
            +
            # by just doing in the console:
         | 
| 4 | 
            +
            # Elastics.doc
         | 
| 5 | 
            +
             | 
| 6 | 
            +
             | 
| 7 | 
            +
             | 
| 8 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 9 | 
            +
            ### Aliases ###
         | 
| 10 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases/
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            # this is the generic interface allowing all options
         | 
| 13 | 
            +
            # you must pass the aliases API structure as :data variable
         | 
| 14 | 
            +
            post_index_aliases:
         | 
| 15 | 
            +
              - POST
         | 
| 16 | 
            +
              - /_aliases
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            get_index_aliases:
         | 
| 19 | 
            +
              - GET
         | 
| 20 | 
            +
              - /<<index>>/_aliases
         | 
| 21 | 
            +
             | 
| 22 | 
            +
            # this is the single index alias
         | 
| 23 | 
            +
            # you can pass other options as :data variable
         | 
| 24 | 
            +
            put_index_alias:
         | 
| 25 | 
            +
              - PUT
         | 
| 26 | 
            +
              - /<<index>>/_alias/<<alias>>
         | 
| 27 | 
            +
             | 
| 28 | 
            +
            delete_index_alias:
         | 
| 29 | 
            +
              - DELETE
         | 
| 30 | 
            +
              - /<<index>>/_alias/<<alias>>
         | 
| 31 | 
            +
             | 
| 32 | 
            +
            get_index_alias:
         | 
| 33 | 
            +
              - GET
         | 
| 34 | 
            +
              - /<<index>>/_alias/<<alias= '*' >>
         | 
| 35 | 
            +
             | 
| 36 | 
            +
             | 
| 37 | 
            +
             | 
| 38 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 39 | 
            +
            ### Analyze ###
         | 
| 40 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-analyze/
         | 
| 41 | 
            +
             | 
| 42 | 
            +
            # you can pass the text to analyze as the :data variable (or the param :text)
         | 
| 43 | 
            +
            # you can pass the parameters as the :params variable
         | 
| 44 | 
            +
            analyze_index:
         | 
| 45 | 
            +
              - GET
         | 
| 46 | 
            +
              - /<<index>>/_analyze
         | 
| 47 | 
            +
             | 
| 48 | 
            +
             | 
| 49 | 
            +
             | 
| 50 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 51 | 
            +
            ### Create Index ###
         | 
| 52 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-create-index.html
         | 
| 53 | 
            +
             | 
| 54 | 
            +
            put_index: &create
         | 
| 55 | 
            +
              - PUT
         | 
| 56 | 
            +
              - /<<index>>
         | 
| 57 | 
            +
              - settings:
         | 
| 58 | 
            +
                  number_of_shards: <<number_of_shards= 5 >>
         | 
| 59 | 
            +
                  number_of_replicas: <<number_of_replicas= 1 >>
         | 
| 60 | 
            +
             | 
| 61 | 
            +
            # aliased
         | 
| 62 | 
            +
            create_index: *create
         | 
| 63 | 
            +
             | 
| 64 | 
            +
            post_index:
         | 
| 65 | 
            +
              - POST
         | 
| 66 | 
            +
              - /<<index>>
         | 
| 67 | 
            +
              - settings:
         | 
| 68 | 
            +
                  number_of_shards: <<number_of_shards= 5 >>
         | 
| 69 | 
            +
                  number_of_replicas: <<number_of_replicas= 1 >>
         | 
| 70 | 
            +
             | 
| 71 | 
            +
             | 
| 72 | 
            +
             | 
| 73 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 74 | 
            +
            ### Delete Index ###
         | 
| 75 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/delete.html
         | 
| 76 | 
            +
             | 
| 77 | 
            +
            delete_index:
         | 
| 78 | 
            +
              - DELETE
         | 
| 79 | 
            +
              - /<<index>>
         | 
| 80 | 
            +
             | 
| 81 | 
            +
             | 
| 82 | 
            +
             | 
| 83 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 84 | 
            +
            ### Open/Close Index ###
         | 
| 85 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-open-close/
         | 
| 86 | 
            +
             | 
| 87 | 
            +
            close_index:
         | 
| 88 | 
            +
              - POST
         | 
| 89 | 
            +
              - /<<index>>/_close
         | 
| 90 | 
            +
             | 
| 91 | 
            +
            open_index:
         | 
| 92 | 
            +
              - POST
         | 
| 93 | 
            +
              - /<<index>>/_open
         | 
| 94 | 
            +
             | 
| 95 | 
            +
             | 
| 96 | 
            +
             | 
| 97 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 98 | 
            +
            ### Get Settings ###
         | 
| 99 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-get-settings.html
         | 
| 100 | 
            +
             | 
| 101 | 
            +
            get_index_settings: &get_index_settings
         | 
| 102 | 
            +
              - GET
         | 
| 103 | 
            +
              - /<<index>>/_settings
         | 
| 104 | 
            +
             | 
| 105 | 
            +
            # alias
         | 
| 106 | 
            +
            get_settings: *get_index_settings
         | 
| 107 | 
            +
             | 
| 108 | 
            +
             | 
| 109 | 
            +
             | 
| 110 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 111 | 
            +
            ### Get Mappings ###
         | 
| 112 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping.html
         | 
| 113 | 
            +
             | 
| 114 | 
            +
            get_index_mapping: &get_index_mapping
         | 
| 115 | 
            +
              - GET
         | 
| 116 | 
            +
              - /<<index>>/<<type>>/_mapping
         | 
| 117 | 
            +
             | 
| 118 | 
            +
            # alias
         | 
| 119 | 
            +
            get_mapping: *get_index_mapping
         | 
| 120 | 
            +
             | 
| 121 | 
            +
             | 
| 122 | 
            +
             | 
| 123 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 124 | 
            +
            ### Put Mappings ###
         | 
| 125 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping.html
         | 
| 126 | 
            +
             | 
| 127 | 
            +
            put_index_mapping: &put_index_mapping
         | 
| 128 | 
            +
              - PUT
         | 
| 129 | 
            +
              - /<<index>>/<<type>>/_mapping
         | 
| 130 | 
            +
              - <<type>>:
         | 
| 131 | 
            +
                  properties: <<properties>>
         | 
| 132 | 
            +
             | 
| 133 | 
            +
            # alias
         | 
| 134 | 
            +
            put_mapping: *put_index_mapping
         | 
| 135 | 
            +
             | 
| 136 | 
            +
             | 
| 137 | 
            +
             | 
| 138 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 139 | 
            +
            ### Delete Mappings ###
         | 
| 140 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-delete-mapping.html
         | 
| 141 | 
            +
             | 
| 142 | 
            +
            delete_index_mapping: &delete_index_mapping
         | 
| 143 | 
            +
              - DELETE
         | 
| 144 | 
            +
              - /<<index>>/<<type>>
         | 
| 145 | 
            +
             | 
| 146 | 
            +
            # alias
         | 
| 147 | 
            +
            delete_mapping: *delete_index_mapping
         | 
| 148 | 
            +
             | 
| 149 | 
            +
             | 
| 150 | 
            +
             | 
| 151 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 152 | 
            +
            ### Refresh ###
         | 
| 153 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-refresh.html
         | 
| 154 | 
            +
             | 
| 155 | 
            +
            refresh_index:
         | 
| 156 | 
            +
              - POST
         | 
| 157 | 
            +
              - /<<index>>/_refresh
         | 
| 158 | 
            +
             | 
| 159 | 
            +
             | 
| 160 | 
            +
             | 
| 161 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 162 | 
            +
            ### Optimize ###
         | 
| 163 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-optimize/
         | 
| 164 | 
            +
             | 
| 165 | 
            +
            # you can pass the parameters as the :params variable
         | 
| 166 | 
            +
            optimize_index:
         | 
| 167 | 
            +
              - POST
         | 
| 168 | 
            +
              - /<<index>>/_optimize
         | 
| 169 | 
            +
             | 
| 170 | 
            +
             | 
| 171 | 
            +
             | 
| 172 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 173 | 
            +
            ### Flush ###
         | 
| 174 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-flush/
         | 
| 175 | 
            +
             | 
| 176 | 
            +
            # you can pass the parameters as the :params variable
         | 
| 177 | 
            +
            flush_index:
         | 
| 178 | 
            +
              - POST
         | 
| 179 | 
            +
              - /<<index>>/_flush
         | 
| 180 | 
            +
             | 
| 181 | 
            +
             | 
| 182 | 
            +
             | 
| 183 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 184 | 
            +
            ### Snapshot ###
         | 
| 185 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-gateway-snapshot/
         | 
| 186 | 
            +
             | 
| 187 | 
            +
            gateway_snapshot:
         | 
| 188 | 
            +
              - POST
         | 
| 189 | 
            +
              - /<<index>>/_gateway/snapshot
         | 
| 190 | 
            +
             | 
| 191 | 
            +
             | 
| 192 | 
            +
             | 
| 193 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 194 | 
            +
            ### Update Settings ###
         | 
| 195 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings/
         | 
| 196 | 
            +
             | 
| 197 | 
            +
            # you can pass the settings structure as the :data variable
         | 
| 198 | 
            +
            update_index_settings:
         | 
| 199 | 
            +
              - PUT
         | 
| 200 | 
            +
              - /<<index>>/_settings
         | 
| 201 | 
            +
             | 
| 202 | 
            +
             | 
| 203 | 
            +
             | 
| 204 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 205 | 
            +
            ### Templates ###
         | 
| 206 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-templates/
         | 
| 207 | 
            +
             | 
| 208 | 
            +
            # you must pass the data structure as :data variable
         | 
| 209 | 
            +
            put_index_template:
         | 
| 210 | 
            +
              - PUT
         | 
| 211 | 
            +
              - /_template/<<template>>
         | 
| 212 | 
            +
             | 
| 213 | 
            +
            delete_index_template:
         | 
| 214 | 
            +
              - DELETE
         | 
| 215 | 
            +
              - /_template/<<template>>
         | 
| 216 | 
            +
             | 
| 217 | 
            +
            get_index_template:
         | 
| 218 | 
            +
              - GET
         | 
| 219 | 
            +
              - /_template/<<template>>
         | 
| 220 | 
            +
             | 
| 221 | 
            +
             | 
| 222 | 
            +
             | 
| 223 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 224 | 
            +
            ### Warmers ###
         | 
| 225 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-warmers/
         | 
| 226 | 
            +
             | 
| 227 | 
            +
            # you must pass the warmer structure as the :data variable
         | 
| 228 | 
            +
            put_index_warmer:
         | 
| 229 | 
            +
              - PUT
         | 
| 230 | 
            +
              - /<<index>>/<<type>>/_warmer/<<warmer>>
         | 
| 231 | 
            +
             | 
| 232 | 
            +
            delete_index_warmer:
         | 
| 233 | 
            +
              - DELETE
         | 
| 234 | 
            +
              - /<<index>>/_warmer/<<warmer= ~ >>
         | 
| 235 | 
            +
             | 
| 236 | 
            +
            get_index_warmer:
         | 
| 237 | 
            +
              - GET
         | 
| 238 | 
            +
              - /<<index>>/_warmer/<<warmer= ~ >>
         | 
| 239 | 
            +
             | 
| 240 | 
            +
             | 
| 241 | 
            +
             | 
| 242 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 243 | 
            +
            ### Stats ###
         | 
| 244 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-stats.html
         | 
| 245 | 
            +
             | 
| 246 | 
            +
            index_stats: &index_stats
         | 
| 247 | 
            +
              - GET
         | 
| 248 | 
            +
              - /<<index>>/_stats/<<endpoint= ~ >>/<<names= ~ >>
         | 
| 249 | 
            +
             | 
| 250 | 
            +
            # alias
         | 
| 251 | 
            +
            stats: *index_stats
         | 
| 252 | 
            +
             | 
| 253 | 
            +
             | 
| 254 | 
            +
             | 
| 255 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 256 | 
            +
            ### Status ###
         | 
| 257 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-status/
         | 
| 258 | 
            +
             | 
| 259 | 
            +
            index_status:
         | 
| 260 | 
            +
              - GET
         | 
| 261 | 
            +
              - /<<index>>/_status
         | 
| 262 | 
            +
             | 
| 263 | 
            +
             | 
| 264 | 
            +
             | 
| 265 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 266 | 
            +
            ### Segments ###
         | 
| 267 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-segments/
         | 
| 268 | 
            +
             | 
| 269 | 
            +
            index_segments:
         | 
| 270 | 
            +
              - GET
         | 
| 271 | 
            +
              - /<<index>>/_segments
         | 
| 272 | 
            +
             | 
| 273 | 
            +
             | 
| 274 | 
            +
             | 
| 275 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 276 | 
            +
            ### Clear Cache ###
         | 
| 277 | 
            +
            #http://www.elasticsearch.org/guide/reference/api/admin-indices-clearcache/
         | 
| 278 | 
            +
             | 
| 279 | 
            +
            index_clearcache:
         | 
| 280 | 
            +
              - POST
         | 
| 281 | 
            +
              - /<<index>>/_cache/clear
         | 
| 282 | 
            +
             | 
| 283 | 
            +
             | 
| 284 | 
            +
             | 
| 285 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 286 | 
            +
            ### Indices Exists ###
         | 
| 287 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-indices-exists.html
         | 
| 288 | 
            +
             | 
| 289 | 
            +
            indices_exists: &exist
         | 
| 290 | 
            +
              - HEAD
         | 
| 291 | 
            +
              - /<<index>>
         | 
| 292 | 
            +
             | 
| 293 | 
            +
            # aliased
         | 
| 294 | 
            +
            exist?: *exist
         | 
| 295 | 
            +
             | 
| 296 | 
            +
             | 
| 297 | 
            +
             | 
| 298 | 
            +
            #-----------------------------------------------------------------------------#
         | 
| 299 | 
            +
            ### Types Exists ###
         | 
| 300 | 
            +
            # http://www.elasticsearch.org/guide/reference/api/admin-indices-types-exists/
         | 
| 301 | 
            +
             | 
| 302 | 
            +
            types_exists:
         | 
| 303 | 
            +
              - HEAD
         | 
| 304 | 
            +
              - /<<index>>/<<type>>
         |