Every line of 'elasticsearch delete index' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
203 def index_delete(self, index): 204 ''' 205 Delets the specified index 206 > search = ElasticSearch() 207 > search.index_delete('twitter') 208 {"ok" : True, "acknowledged" : True } 209 ''' 210 request = self.session 211 url = 'http://%s:%s/%s' % (self.host, self.port, index) 212 response = request.delete(url) 213 return response
167 @query_params('allow_no_indices', 'expand_wildcards', 'ignore_unavailable', 168 'master_timeout', 'timeout') 169 def delete(self, index, params=None): 170 """ 171 Delete an index in Elasticsearch 172 ``_ 173 174 :arg index: A comma-separated list of indices to delete; use `_all` or 175 `*` string to delete all indices 176 :arg allow_no_indices: Ignore if a wildcard expression resolves to no 177 concrete indices (default: false) 178 :arg expand_wildcards: Whether wildcard expressions should get expanded 179 to open or closed indices (default: open), default 'open', valid 180 choices are: 'open', 'closed', 'none', 'all' 181 :arg ignore_unavailable: Ignore unavailable indexes (default: false) 182 :arg master_timeout: Specify timeout for connection to master 183 :arg timeout: Explicit operation timeout 184 """ 185 if index in SKIP_IN_PATH: 186 raise ValueError("Empty value passed for a required argument 'index'.") 187 return self.transport.perform_request('DELETE', _make_path(index), 188 params=params)
91 def delete(self, **kwargs): 92 "Delete document not delete index." 93 kw = dict(index=self.name, doc_type=self.doc_type, ignore=[404]) 94 kw.update(**kwargs) 95 return self._client.delete(**kw)
87 def delete_index(index_name): 88 es = connect() 89 return es.indices.delete(index_name, ignore=[400, 404])