As far as I can see from the docs and the Java API, automatic index
creation can only be disabled globally (per node). For my use case, it
would be extremely useful to specify this either for certain kinds of
indexes (via index template?) or even on a request basis (i.e. with each
indexing request).
Background: we're using an alias to point to one "active" index out of
several. If none of the indexes have the "active" alias, we don't want an
index of that name to be created accidentally when trying to add documents.
We could simply check for alias existence before indexing, but that
obviously invites a race condition.
OTOH, we could disable automatic index creation, but we really need that
for another kind of index. Running several separate ES instances would be a
waste.
Is there any existing API call I've missed to solve this problem?
I think this request makes a lot of sense. Thought a bit about how to expose it, and created this issue describing how best to support it. Should be in upcoming 0.20. I am not a big fan of providing a flag on the index API (for example) to control it.
As far as I can see from the docs and the Java API, automatic index creation can only be disabled globally (per node). For my use case, it would be extremely useful to specify this either for certain kinds of indexes (via index template?) or even on a request basis (i.e. with each indexing request).
Background: we're using an alias to point to one "active" index out of several. If none of the indexes have the "active" alias, we don't want an index of that name to be created accidentally when trying to add documents. We could simply check for alias existence before indexing, but that obviously invites a race condition.
OTOH, we could disable automatic index creation, but we really need that for another kind of index. Running several separate ES instances would be a waste.
Is there any existing API call I've missed to solve this problem?
On Sunday, 21 October 2012 02:25:54 UTC+2, kimchy wrote:
I think this request makes a lot of sense. Thought a bit about how to
expose it, and created this issue describing how best to support it. Should
be in upcoming 0.20. I am not a big fan of providing a flag on the index
API (for example) to control it.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.