Fail with IndexMissingException if index does not exist

Hi

I have noticed that the index just automatically gets created if you
try to index a new document into an index that does not already exist.

Can I somehow change that behaviour, so that I get a
IndexMissingException instead, in such cases?

Regards, Per Steffensen

Yes, set action.auto_create_index setting to false.

On Thu, Oct 6, 2011 at 3:19 PM, Steff steff@designware.dk wrote:

Hi

I have noticed that the index just automatically gets created if you
try to index a new document into an index that does not already exist.

Can I somehow change that behaviour, so that I get a
IndexMissingException instead, in such cases?

Regards, Per Steffensen

1 Like

On 6 Okt., 16:55, Shay Banon kim...@gmail.com wrote:

Yes, set action.auto_create_index setting to false.

Thanks. It seems to do the job.

Just a clarifying question.
Does this setting need to be on the (client-)node where you call
node.client().admin().indices().create(createIndexRequest).actionGet()?
Or in the settings of createIndexRequest? Or in the elastissearch.yml
of the (non-client-)nodes actually managing indexes and shards? Or all
places or...?
Just a short comment about where this "setting" is used and where it
is not used, would be great. Thanks

It should be set on all "master eligible nodes". Client nodes (nodes started
with node.client set to true, or using NodeBuilder.cleint(true) ) will not
become master nodes. The setting is basically checked checked on the
currently elected master node.

On Tue, Oct 11, 2011 at 2:08 PM, Steff steff@designware.dk wrote:

On 6 Okt., 16:55, Shay Banon kim...@gmail.com wrote:

Yes, set action.auto_create_index setting to false.

Thanks. It seems to do the job.

Just a clarifying question.
Does this setting need to be on the (client-)node where you call
node.client().admin().indices().create(createIndexRequest).actionGet()?
Or in the settings of createIndexRequest? Or in the elastissearch.yml
of the (non-client-)nodes actually managing indexes and shards? Or all
places or...?
Just a short comment about where this "setting" is used and where it
is not used, would be great. Thanks

Sorry, was thinking about another setting in another thread, and answered
this one... . The setting should be set on all nodes, including the client
nodes. Its basically checked on the node that actually "starts" the index
operation, checking if the index exists, and if not, creates the index.

On Wed, Oct 12, 2011 at 10:59 PM, Shay Banon kimchy@gmail.com wrote:

It should be set on all "master eligible nodes". Client nodes (nodes
started with node.client set to true, or using NodeBuilder.cleint(true) )
will not become master nodes. The setting is basically checked checked on
the currently elected master node.

On Tue, Oct 11, 2011 at 2:08 PM, Steff steff@designware.dk wrote:

On 6 Okt., 16:55, Shay Banon kim...@gmail.com wrote:

Yes, set action.auto_create_index setting to false.

Thanks. It seems to do the job.

Just a clarifying question.
Does this setting need to be on the (client-)node where you call
node.client().admin().indices().create(createIndexRequest).actionGet()?
Or in the settings of createIndexRequest? Or in the elastissearch.yml
of the (non-client-)nodes actually managing indexes and shards? Or all
places or...?
Just a short comment about where this "setting" is used and where it
is not used, would be great. Thanks

On 12 Okt., 23:01, Shay Banon kim...@gmail.com wrote:

Sorry, was thinking about another setting in another thread, and answered
this one... . The setting should be set on all nodes, including the client
nodes. Its basically checked on the node that actually "starts" the index
operation, checking if the index exists, and if not, creates the index.

Thanks