Undocumented "Feature"

Hi,

I think this is a bug. If you enter:

$ curl -XDELETE http://localhost:9200/

you will delete every index in the cluster!

Not a pretty site!

This is on 18-SNAPSHOT a couple of weeks old.

...Ken

It's not a bug, when you don't specify an index a lot of operations operate
on all indexes. This is very handy for e.g. optimizing all indexes, or in
development drop them all.

Great for development, maybe, but a nuclear bomb in production.

...Ken

On Tue, Nov 8, 2011 at 5:17 PM, Ævar Arnfjörð Bjarmason avarab@gmail.comwrote:

It's not a bug, when you don't specify an index a lot of operations
operate on all indexes. This is very handy for e.g. optimizing all indexes,
or in development drop them all.

Hi Kenneth,

in production you can use this setting in your config file to avoid nuclear
bomb :wink:

action.disable_delete_all_indices (defaults to false) that can be set to
true in order to disable deleting all indices in a single API call.

On Wed, Nov 9, 2011 at 00:52, Kenneth Loafman kenneth@loafman.com wrote:

Great for development, maybe, but a nuclear bomb in production.
...Ken

IMNSHO: If you're performing manual maintenance with curl like this in
production you've got bigger problems that ES performing wildcard
operations when you don't specify specific indexes.

Where I work with ES in production it's set up so that:

  • Anything like Elasticsearch Head etc. communicates with it it
    through an http proxy that only allows GET requests through.

  • Any creation / maintenance etc. of indexes is done by cronjobs that
    have been tested in a development environment first and not by
    people manually executing curl commands on production machines.