Indexing with Bulk API

Hi,

I am indexing some items using Bulk API and using the folowing binary
content :

{ "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" } }
{ "field1" : "value1" }

If the index 'test' and/or the mapping 'type1', don't exist in my server,
it is automatically created
Then, an item with id '1' is indexed with { "field1" : "value1" } source.

How could I have an error if the index and/or the mapping don't exist ? In
other words, how could I tell the server not to create automatically the
index/mapping if the don't exist ?

Pierre

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

How could I have an error if the index and/or the mapping don't
exist ? In other words, how could I tell the server not to create
automatically the index/mapping if the don't exist ?

Add this to your config/elasticsearch.yml:

action.auto_create_index: 0
index.mapper.dynamic: 0

clint

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Pierre De Soyres writes:

Hi,

I am indexing some items using Bulk API and using the folowing binary
content :

{ "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" } }
{ "field1" : "value1" }

If the index 'test' and/or the mapping 'type1', don't exist in my server,
it is automatically created
Then, an item with id '1' is indexed with { "field1" : "value1" } source.

How could I have an error if the index and/or the mapping don't exist ? In
other words, how could I tell the server not to create automatically the
index/mapping if the don't exist ?

Pierre

Hi Pierre,

You can disallow dynamic mappings using this setting in
elasticsearch.yml:

index.mapper.dynamic: false

;; Lee Hinman

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.