Hello Andrej,
I didn't come across a situation where I needed that. For me, the only
thing that came close was what I consider a more restrictive approach
of disabling dynamic mapping[0]:
grep "index.mapper.dynamic" /etc/elasticsearch/elasticsearch.yml
index.mapper.dynamic: false
In this case one wouldn't be allowed to write a document which
contains a field that is not mapped. So you can put an index manually
if you want:
curl -XPUT localhost:9200/testing
{"ok":true,"acknowledged":true}
But you can't "accidentally" index a document in it:
curl -XPUT localhost:9200/testing/test/1 -d '{"foo":"bar"}'
{"error":"TypeMissingException[[testing] type[test] missing: trying to
auto create mapping, but dynamic mapping is disabled]","status":404}
Unless you explicitly create a mapping:
curl -XPUT localhost:9200/testing/test/_mapping -d
'{"properties":{"foo":{"type":"string"}}}'
{"ok":true,"acknowledged":true}
curl -XPUT localhost:9200/testing/test/1 -d '{"foo":"bar"}'
{"ok":true,"_index":"testing","_type":"test","_id":"1","_version":1}
If this doesn't help in your usecase, then I can't think of something
closer. So it would be a nice to have feature, if you need it
Although I don't know why you need that. Can you share?
[0] Elasticsearch Platform — Find real-time answers at scale | Elastic
Best regards,
Radu
http://sematext.com/ -- Elasticsearch -- Solr -- Lucene
On Fri, Nov 9, 2012 at 3:49 PM, Andrej Rosenheinrich
andrej.rosenheinrich@unister.de wrote:
Hi,
probably a simple question, I couldnt find anything in the update settings
api: I can block writing or reading, but is there a way to allow writing and
reading on a cluster but block creation of new indices? If this is not
possible yet, wouldnt it be a nice to have feature?
Thanks!
Andrej
--
--