Is there a way to have elasticsearch deny index requests on an index?


(Ittai Zeidman) #1

Is there a way to have elasticsearch deny index requests on an index?
The usecase for this is that when I want to update a mapping of a type, I'd
like to deny incomming indexing requests while I'm reindexing into a new
index.

Thanks


(Shay Banon) #2

In upcoming 0.19, you will be able to set an index to be read only: https://github.com/elasticsearch/elasticsearch/issues/1573.

On Tuesday, February 7, 2012 at 2:12 PM, Ittai Zeidman wrote:

Is there a way to have elasticsearch deny index requests on an index?
The usecase for this is that when I want to update a mapping of a type, I'd like to deny incomming indexing requests while I'm reindexing into a new index.

Thanks


(Ivan Brusic) #3

Can this setting be set dynamically? Must the index be closed in order
to reopen it as read-only? I am assuming the standard Lucene
performance (greater concurrency) benefit applies.

I am thinking of using this feature in conjunction with index aliases.
Write to a new index and then setting it to read only.

--
Ivan

On Tue, Feb 7, 2012 at 4:16 AM, Shay Banon kimchy@gmail.com wrote:

In upcoming 0.19, you will be able to set an index to be read
only: https://github.com/elasticsearch/elasticsearch/issues/1573.

On Tuesday, February 7, 2012 at 2:12 PM, Ittai Zeidman wrote:

Is there a way to have elasticsearch deny index requests on an index?
The usecase for this is that when I want to update a mapping of a type, I'd
like to deny incomming indexing requests while I'm reindexing into a new
index.

Thanks


(Shay Banon) #4

Yes, you can set it dynamically using the index update settings API. If you have a closed index, you can first update its settings to be read only, and then open it. Don't understand the greater concurrency comment…, do you mean that if an index is read only, it will have better concurrency? in this case, the answer is no, ti will have the same.

On Wednesday, February 8, 2012 at 8:53 PM, Ivan Brusic wrote:

Can this setting be set dynamically? Must the index be closed in order
to reopen it as read-only? I am assuming the standard Lucene
performance (greater concurrency) benefit applies.

I am thinking of using this feature in conjunction with index aliases.
Write to a new index and then setting it to read only.

--
Ivan

On Tue, Feb 7, 2012 at 4:16 AM, Shay Banon <kimchy@gmail.com (mailto:kimchy@gmail.com)> wrote:

In upcoming 0.19, you will be able to set an index to be read
only: https://github.com/elasticsearch/elasticsearch/issues/1573.

On Tuesday, February 7, 2012 at 2:12 PM, Ittai Zeidman wrote:

Is there a way to have elasticsearch deny index requests on an index?
The usecase for this is that when I want to update a mapping of a type, I'd
like to deny incomming indexing requests while I'm reindexing into a new
index.

Thanks


(system) #5