Question about aliases


(Stephen-2) #1

Hey guys,

I was looking to build in some automatic re-index logic into my
system, and was planning to use aliases to keep the old index around
while I'm rebuilding the new one. Now, I could find a way to keep
track of the indexes that I've aliased in a database, but I figured
that since ES knows what its aliases are, it would probably make sense
to ask the search service what index its alias is pointing to.

Trouble is, I can't find such an API. Am I missing something? Or is
it just something nobody's ever asked for?

Anyway, thanks again for all the hard work. Can't wait to get started
using this thing in a real production system!

Stephen.


(Shay Banon) #2

Both the index status and cluster state provide information on the aliases
of each index.

-shay.banon

On Fri, Jul 30, 2010 at 3:21 PM, Stephen scstarkey@gmail.com wrote:

Hey guys,

I was looking to build in some automatic re-index logic into my
system, and was planning to use aliases to keep the old index around
while I'm rebuilding the new one. Now, I could find a way to keep
track of the indexes that I've aliased in a database, but I figured
that since ES knows what its aliases are, it would probably make sense
to ask the search service what index its alias is pointing to.

Trouble is, I can't find such an API. Am I missing something? Or is
it just something nobody's ever asked for?

Anyway, thanks again for all the hard work. Can't wait to get started
using this thing in a real production system!

Stephen.


(system) #3