Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make index required in DELETE index API #4481

Closed
clintongormley opened this issue Dec 17, 2013 · 5 comments

Comments

Projects
None yet
4 participants
@clintongormley
Copy link
Member

commented Dec 17, 2013

Currently this request:

DELETE /

... will delete all indices. We should change this to require an index name or wildcard, to prevent data loss from typos.

The delete-all syntax would be either of:

DELETE /_all
DELETE /*
@nik9000

This comment has been minimized.

Copy link
Contributor

commented Dec 17, 2013

+1 for either syntax. Doesn't the /_all syntax match the close api? I'm going from memory here.

@clintongormley

This comment has been minimized.

Copy link
Member Author

commented Dec 17, 2013

It does, but you can also use /* wildcards for delete. We will be adding wildcards for open/close too.

@kwloafman

This comment has been minimized.

Copy link

commented Dec 17, 2013

As one who has learned painfully from that typo, I +1 this idea.

On Tue, Dec 17, 2013 at 8:59 AM, Clinton Gormley
notifications@github.comwrote:

It does, but you can also use /* wildcards for delete. We will be adding
wildcards for open/close too.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4481#issuecomment-30757284
.

@javanna

This comment has been minimized.

Copy link
Member

commented Jan 6, 2014

This issue will be incorporated in #4549, which consists of disallowing all destructive operations by default. The idea is to keep the DELETE / syntax around as it makes sense REST-wise, but will need to be enabled through a configuration parameter, that will work cross-APIs for all the potentially desctructive operations.

@javanna

This comment has been minimized.

Copy link
Member

commented Jan 7, 2014

Update: the DELETE / won't be kept around in the end, but will be removed as it's harmful. Ignore my last comment.

martijnvg added a commit to martijnvg/elasticsearch that referenced this issue Jan 9, 2014

Added `action.destructive_requires_name` that controls whether wildca…
…rd expressions and `_all` is allowed to be used for destructive operat

Also the delete index api requires always an index to be specified (either concrete index, alias or wildcard expression)

Closes elastic#4549 elastic#4481

martijnvg added a commit that referenced this issue Jan 9, 2014

Added `action.destructive_requires_name` that controls whether wildca…
…rd expressions and `_all` is allowed to be used for destructive operat Also the delete index api requires always an index to be specified (either concrete index, alias or wildcard expression)

Closes #4549 #4481

brusic added a commit to brusic/elasticsearch that referenced this issue Jan 19, 2014

Added `action.destructive_requires_name` that controls whether wildca…
…rd expressions and `_all` is allowed to be used for destructive operat Also the delete index api requires always an index to be specified (either concrete index, alias or wildcard expression)

Closes elastic#4549 elastic#4481
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.