Index management


(Ivan Brusic) #1

I am working on a tool to automatically maintain (update replicas, cache,
etc...) indices based on various properties.

  1. Is the only place to add custom properties for an index is via the
    settings? Works fine for me, just wondering if there was an another way.

  2. What is the proper way to get all indices in the cluster? Currently I am
    executing a default ClusterHealthRequest request to the ClusterAdminClient.
    This returns all the indices with their ClusterIndexHealth, but not their
    settings. In order to get the settings, I then need to execute a
    ClusterStateRequest and dig deep into the response:
    response.state().metaData().getSettings().

Once again, I was wondering if there is another way to get all indices and
their settings. The ideal solution for my scenario would be to search
against index settings, which would require an index of indices, similar to
the way rivers are stored.

Cheers,

Ivan

--


(Ivan Brusic) #2

A correction for point #1. Custom settings works fine at index creation
time, but do not work afterwards since MetaDataUpdateSettingsService
rejects any non-dynamic settings. Is there another way to attach custom
data to an index?

On Tue, Oct 9, 2012 at 10:12 AM, Ivan Brusic ivan@brusic.com wrote:

I am working on a tool to automatically maintain (update replicas, cache,
etc...) indices based on various properties.

  1. Is the only place to add custom properties for an index is via the
    settings? Works fine for me, just wondering if there was an another way.

  2. What is the proper way to get all indices in the cluster? Currently I
    am executing a default ClusterHealthRequest request to the
    ClusterAdminClient. This returns all the indices with their
    ClusterIndexHealth, but not their settings. In order to get the settings, I
    then need to execute a ClusterStateRequest and dig deep into the response:
    response.state().metaData().getSettings().

Once again, I was wondering if there is another way to get all indices and
their settings. The ideal solution for my scenario would be to search
against index settings, which would require an index of indices, similar to
the way rivers are stored.

Cheers,

Ivan

--


(Ivan Brusic) #3

Any thoughts about adding metadata to indices?

My current workaround is to add metadata using aliases. Hack? Yup, but it
works. I would like a cleaner solution. Perhaps I should create my own
metadata index.

--
Ivan

On Tue, Oct 9, 2012 at 12:04 PM, Ivan Brusic ivan@brusic.com wrote:

A correction for point #1. Custom settings works fine at index creation
time, but do not work afterwards since MetaDataUpdateSettingsService
rejects any non-dynamic settings. Is there another way to attach custom
data to an index?

On Tue, Oct 9, 2012 at 10:12 AM, Ivan Brusic ivan@brusic.com wrote:

I am working on a tool to automatically maintain (update replicas, cache,
etc...) indices based on various properties.

  1. Is the only place to add custom properties for an index is via the
    settings? Works fine for me, just wondering if there was an another way.

  2. What is the proper way to get all indices in the cluster? Currently I
    am executing a default ClusterHealthRequest request to the
    ClusterAdminClient. This returns all the indices with their
    ClusterIndexHealth, but not their settings. In order to get the settings, I
    then need to execute a ClusterStateRequest and dig deep into the response:
    response.state().metaData().getSettings().

Once again, I was wondering if there is another way to get all indices
and their settings. The ideal solution for my scenario would be to search
against index settings, which would require an index of indices, similar to
the way rivers are stored.

Cheers,

Ivan

--


(Shay Banon) #4
  1. There isn't a way to add custom metadata to an index (there is actually to do it on the mapping type). It makes sense, I would say, want to open an issue? One trick that you can do now is to have a default mapping with meta element in it.

  2. The cluster state API will get you back all the indices information with its settings.

On Oct 19, 2012, at 8:55 PM, Ivan Brusic ivan@brusic.com wrote:

Any thoughts about adding metadata to indices?

My current workaround is to add metadata using aliases. Hack? Yup, but it works. I would like a cleaner solution. Perhaps I should create my own metadata index.

--
Ivan

On Tue, Oct 9, 2012 at 12:04 PM, Ivan Brusic ivan@brusic.com wrote:
A correction for point #1. Custom settings works fine at index creation time, but do not work afterwards since MetaDataUpdateSettingsService rejects any non-dynamic settings. Is there another way to attach custom data to an index?

On Tue, Oct 9, 2012 at 10:12 AM, Ivan Brusic ivan@brusic.com wrote:
I am working on a tool to automatically maintain (update replicas, cache, etc...) indices based on various properties.

  1. Is the only place to add custom properties for an index is via the settings? Works fine for me, just wondering if there was an another way.

  2. What is the proper way to get all indices in the cluster? Currently I am executing a default ClusterHealthRequest request to the ClusterAdminClient. This returns all the indices with their ClusterIndexHealth, but not their settings. In order to get the settings, I then need to execute a ClusterStateRequest and dig deep into the response: response.state().metaData().getSettings().

Once again, I was wondering if there is another way to get all indices and their settings. The ideal solution for my scenario would be to search against index settings, which would require an index of indices, similar to the way rivers are stored.

Cheers,

Ivan

--

--


(Ivan Brusic) #5

Opened an issue: https://github.com/elasticsearch/elasticsearch/issues/2373

The mapping suggestion is another great idea. So far, aliases have been
proven quite useful since I can visually inspect the most important
property using head.

--
Ivan

On Sat, Oct 20, 2012 at 3:46 PM, kimchy@gmail.com wrote:

  1. There isn't a way to add custom metadata to an index (there is actually
    to do it on the mapping type). It makes sense, I would say, want to open an
    issue? One trick that you can do now is to have a default mapping with
    meta element in it.

  2. The cluster state API will get you back all the indices information
    with its settings.

On Oct 19, 2012, at 8:55 PM, Ivan Brusic ivan@brusic.com wrote:

Any thoughts about adding metadata to indices?

My current workaround is to add metadata using aliases. Hack? Yup, but it
works. I would like a cleaner solution. Perhaps I should create my own
metadata index.

--
Ivan

On Tue, Oct 9, 2012 at 12:04 PM, Ivan Brusic ivan@brusic.com wrote:

A correction for point #1. Custom settings works fine at index creation
time, but do not work afterwards since MetaDataUpdateSettingsService
rejects any non-dynamic settings. Is there another way to attach custom
data to an index?

On Tue, Oct 9, 2012 at 10:12 AM, Ivan Brusic ivan@brusic.com wrote:

I am working on a tool to automatically maintain (update replicas,
cache, etc...) indices based on various properties.

  1. Is the only place to add custom properties for an index is via the
    settings? Works fine for me, just wondering if there was an another way.

  2. What is the proper way to get all indices in the cluster? Currently I
    am executing a default ClusterHealthRequest request to the
    ClusterAdminClient. This returns all the indices with their
    ClusterIndexHealth, but not their settings. In order to get the settings, I
    then need to execute a ClusterStateRequest and dig deep into the response:
    response.state().metaData().getSettings().

Once again, I was wondering if there is another way to get all indices
and their settings. The ideal solution for my scenario would be to search
against index settings, which would require an index of indices, similar to
the way rivers are stored.

Cheers,

Ivan

--

--

--


(system) #6