# Retrieving the cluster's state with indices filters

**URL:** <https://discuss.elastic.co/t/retrieving-the-clusters-state-with-indices-filters/13288>\
**Category:** Elasticsearch\
**Created:** [August 21, 2013, 8:56pm UTC](https://discuss.elastic.co/t/retrieving-the-clusters-state-with-indices-filters/13288 "2013-08-21T20:56:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![didier\_baquier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/didier_baquier/32/2055_2.png) [@didier\_baquier](https://discuss.elastic.co/u/didier_baquier)\
**Post date:** [August 21, 2013, 8:56pm UTC](https://discuss.elastic.co/t/retrieving-the-clusters-state-with-indices-filters/13288/1 "2013-08-21T20:56:24Z")

</div>

Hi folks,

I am currently updating my app to use the latest version of ES (0.90.3),  
before I was using (0.19.12).

I had the following line to retrieve the state of the cluster with a filter  
on indices :

val clusterState = client.admin().cluster().prepareState().setFilterIndices(  
aliasName).execute().actionGet().getState()

The aliasName could be an existing index or not. It was perfectly working  
on 0.19.12.

Now the actionGet() method throws an exception if the aliasName is not an  
existing index.

java.lang.reflect.InvocationTargetException  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.  
java:39)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(  
DelegatingMethodAccessorImpl.java:25)  
at java.lang.reflect.Method.invoke(Method.java:597)  
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)  
at java.lang.Thread.run(Thread.java:680)  
Caused by: org.elasticsearch.indices.IndexMissingException: [en\_us\_old]missing  
at org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.  
java:529)  
at org.elasticsearch.cluster.metadata.MetaData.concreteIndicesIgnoreMissing  
(MetaData.java:509)  
at org.elasticsearch.action.admin.cluster.state.TransportClusterStateAction  
.masterOperation(TransportClusterStateAction.java:101)  
at org.elasticsearch.action.admin.cluster.state.TransportClusterStateAction  
.masterOperation(TransportClusterStateAction.java:42)  
at org.elasticsearch.action.support.master.  
TransportMasterNodeOperationAction$2.run(TransportMasterNodeOperationAction.  
java:144)  
at org.elasticsearch.common.util.concurrent.  
MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:293)  
at org.elasticsearch.action.support.master.  
TransportMasterNodeOperationAction.innerExecute(  
TransportMasterNodeOperationAction.java:140)  
at org.elasticsearch.action.support.master.  
TransportMasterNodeOperationAction.doExecute(  
TransportMasterNodeOperationAction.java:94)  
at org.elasticsearch.action.support.master.  
TransportMasterNodeOperationAction.doExecute(  
TransportMasterNodeOperationAction.java:42)  
at org.elasticsearch.action.support.TransportAction.execute(TransportAction  
.java:61)  
at org.elasticsearch.action.support.master.  
TransportMasterNodeOperationAction.execute(  
TransportMasterNodeOperationAction.java:89)  
at org.elasticsearch.action.support.master.  
TransportMasterNodeOperationAction$TransportHandler.messageReceived(  
TransportMasterNodeOperationAction.java:266)  
at org.elasticsearch.action.support.master.  
TransportMasterNodeOperationAction$TransportHandler.messageReceived(  
TransportMasterNodeOperationAction.java:250)  
at org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(  
MessageChannelHandler.java:211)  
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(  
MessageChannelHandler.java:108)  
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.  
handleUpstream(SimpleChannelUpstreamHandler.java:70)  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
sendUpstream(DefaultChannelPipeline.java:564)  
at org.elasticsearch.common.netty.channel.  
DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(  
DefaultChannelPipeline.java:791)  
at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(  
Channels.java:296)  
at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.  
unfoldAndFireMessageReceived(FrameDecoder.java:462)  
at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.  
callDecode(FrameDecoder.java:443)  
at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.  
messageReceived(FrameDecoder.java:303)  
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.  
handleUpstream(SimpleChannelUpstreamHandler.java:70)  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
sendUpstream(DefaultChannelPipeline.java:564)  
at org.elasticsearch.common.netty.channel.  
DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(  
DefaultChannelPipeline.java:791)  
at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(  
OpenChannelsHandler.java:74)  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
sendUpstream(DefaultChannelPipeline.java:564)  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
sendUpstream(DefaultChannelPipeline.java:559)  
at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(  
Channels.java:268)  
at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(  
Channels.java:255)  
at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(  
NioWorker.java:88)  
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.  
process(AbstractNioWorker.java:109)  
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.  
run(AbstractNioSelector.java:312)  
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(  
AbstractNioWorker.java:90)  
at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(  
NioWorker.java:178)  
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(  
ThreadRenamingRunnable.java:108)  
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(  
DeadLockProofWorker.java:42)  
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(  
ThreadPoolExecutor.java:895)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.  
java:918)  
... 1 more

Could you please help me on that issue?

thanks guys

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [August 22, 2013, 5:00pm UTC](https://discuss.elastic.co/t/retrieving-the-clusters-state-with-indices-filters/13288/2 "2013-08-22T17:00:18Z")

</div>

I run some similar code and it works fine on 0.90.2. If it truly is a  
regression bug, one of these issues might have affected it:

> **[Issues · elastic/elasticsearch](https://github.com/elastic/elasticsearch/issues?q=is%3Aclosed%2Bsort%3Aupdated-desc%2Blabel%3Av0.90.3)**
>
> Free and Open, Distributed, RESTful Search Engine. Contribute to elastic/elasticsearch development by creating an account on GitHub.

Cheers,

Ivan

On Wed, Aug 21, 2013 at 1:56 PM, [didier.baquier@gmail.com](mailto:didier.baquier@gmail.com) wrote:

> Hi folks,
> 
> I am currently updating my app to use the latest version of ES (0.90.3),  
> before I was using (0.19.12).
> 
> I had the following line to retrieve the state of the cluster with a  
> filter on indices :
> 
> val clusterState = client.admin().cluster().prepareState().  
> setFilterIndices(aliasName).execute().actionGet().getState()
> 
> The aliasName could be an existing index or not. It was perfectly working  
> on 0.19.12.
> 
> Now the actionGet() method throws an exception if the aliasName is not an  
> existing index.
> 
> java.lang.reflect.InvocationTargetException  
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.  
> java:39)  
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(  
> DelegatingMethodAccessorImpl.java:25)  
> at java.lang.reflect.Method.invoke(Method.java:597)  
> at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)  
> at java.lang.Thread.run(Thread.java:680)  
> Caused by: org.elasticsearch.indices.IndexMissingException: [en\_us\_old]missing  
> at org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.  
> java:529)  
> at org.elasticsearch.cluster.metadata.MetaData.  
> concreteIndicesIgnoreMissing(MetaData.java:509)  
> at org.elasticsearch.action.admin.cluster.state.  
> TransportClusterStateAction.masterOperation(TransportClusterStateAction.  
> java:101)  
> at org.elasticsearch.action.admin.cluster.state.  
> TransportClusterStateAction.masterOperation(TransportClusterStateAction.  
> java:42)  
> at org.elasticsearch.action.support.master.  
> TransportMasterNodeOperationAction$2.run(  
> TransportMasterNodeOperationAction.java:144)  
> at org.elasticsearch.common.util.concurrent.  
> MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:293)  
> at org.elasticsearch.action.support.master.  
> TransportMasterNodeOperationAction.innerExecute(  
> TransportMasterNodeOperationAction.java:140)  
> at org.elasticsearch.action.support.master.  
> TransportMasterNodeOperationAction.doExecute(  
> TransportMasterNodeOperationAction.java:94)  
> at org.elasticsearch.action.support.master.  
> TransportMasterNodeOperationAction.doExecute(  
> TransportMasterNodeOperationAction.java:42)  
> at org.elasticsearch.action.support.TransportAction.execute(  
> TransportAction.java:61)  
> at org.elasticsearch.action.support.master.  
> TransportMasterNodeOperationAction.execute(  
> TransportMasterNodeOperationAction.java:89)  
> at org.elasticsearch.action.support.master.  
> TransportMasterNodeOperationAction$TransportHandler.messageReceived(  
> TransportMasterNodeOperationAction.java:266)  
> at org.elasticsearch.action.support.master.  
> TransportMasterNodeOperationAction$TransportHandler.messageReceived(  
> TransportMasterNodeOperationAction.java:250)  
> at org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(  
> MessageChannelHandler.java:211)  
> at org.elasticsearch.transport.netty.MessageChannelHandler.  
> messageReceived(MessageChannelHandler.java:108)  
> at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.  
> handleUpstream(SimpleChannelUpstreamHandler.java:70)  
> at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
> sendUpstream(DefaultChannelPipeline.java:564)  
> at org.elasticsearch.common.netty.channel.  
> DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(  
> DefaultChannelPipeline.java:791)  
> at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(  
> Channels.java:296)  
> at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.  
> unfoldAndFireMessageReceived(FrameDecoder.java:462)  
> at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.  
> callDecode(FrameDecoder.java:443)  
> at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.  
> messageReceived(FrameDecoder.java:303)  
> at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.  
> handleUpstream(SimpleChannelUpstreamHandler.java:70)  
> at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
> sendUpstream(DefaultChannelPipeline.java:564)  
> at org.elasticsearch.common.netty.channel.  
> DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(  
> DefaultChannelPipeline.java:791)  
> at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(  
> OpenChannelsHandler.java:74)  
> at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
> sendUpstream(DefaultChannelPipeline.java:564)  
> at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
> sendUpstream(DefaultChannelPipeline.java:559)  
> at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(  
> Channels.java:268)  
> at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(  
> Channels.java:255)  
> at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(  
> NioWorker.java:88)  
> at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.  
> process(AbstractNioWorker.java:109)  
> at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.  
> run(AbstractNioSelector.java:312)  
> at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.  
> run(AbstractNioWorker.java:90)  
> at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(  
> NioWorker.java:178)  
> at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(  
> ThreadRenamingRunnable.java:108)  
> at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run  
> (DeadLockProofWorker.java:42)  
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(  
> ThreadPoolExecutor.java:895)  
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.  
> java:918)  
> ... 1 more
> 
> Could you please help me on that issue?
> 
> thanks guys
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![didier\_baquier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/didier_baquier/32/2055_2.png) [@didier\_baquier](https://discuss.elastic.co/u/didier_baquier)\
**Post date:** [August 22, 2013, 5:04pm UTC](https://discuss.elastic.co/t/retrieving-the-clusters-state-with-indices-filters/13288/3 "2013-08-22T17:04:02Z")

</div>

Thanks Ivan,

I presume that you tried with a non-existing index?

is someone can try on 0.90.3? could be a great help!

thanks

Le jeudi 22 août 2013 10:00:18 UTC-7, Ivan Brusic a écrit :

> I run some similar code and it works fine on 0.90.2. If it truly is a  
> regression bug, one of these issues might have affected it:
> 
> [Issues · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues?direction=desc&labels=v0.90.3&page=1&sort=updated&state=closed)
> 
> Cheers,
> 
> Ivan
> 
> On Wed, Aug 21, 2013 at 1:56 PM, \<[didier....@gmail.com](mailto:didier....@gmail.com) \<javascript:\>\>wrote:
> 
> > Hi folks,
> > 
> > I am currently updating my app to use the latest version of ES (0.90.3),  
> > before I was using (0.19.12).
> > 
> > I had the following line to retrieve the state of the cluster with a  
> > filter on indices :
> > 
> > val clusterState = client.admin().cluster().prepareState().  
> > setFilterIndices(aliasName).execute().actionGet().getState()
> > 
> > The aliasName could be an existing index or not. It was perfectly working  
> > on 0.19.12.
> > 
> > Now the actionGet() method throws an exception if the aliasName is not an  
> > existing index.
> > 
> > java.lang.reflect.InvocationTargetException  
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.  
> > java:39)  
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(  
> > DelegatingMethodAccessorImpl.java:25)  
> > at java.lang.reflect.Method.invoke(Method.java:597)  
> > at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)  
> > at java.lang.Thread.run(Thread.java:680)  
> > Caused by: org.elasticsearch.indices.IndexMissingException: [en\_us\_old]missing  
> > at org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.  
> > java:529)  
> > at org.elasticsearch.cluster.metadata.MetaData.  
> > concreteIndicesIgnoreMissing(MetaData.java:509)  
> > at org.elasticsearch.action.admin.cluster.state.  
> > TransportClusterStateAction.masterOperation(TransportClusterStateAction.  
> > java:101)  
> > at org.elasticsearch.action.admin.cluster.state.  
> > TransportClusterStateAction.masterOperation(TransportClusterStateAction.  
> > java:42)  
> > at org.elasticsearch.action.support.master.  
> > TransportMasterNodeOperationAction$2.run(  
> > TransportMasterNodeOperationAction.java:144)  
> > at org.elasticsearch.common.util.concurrent.  
> > MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:293)  
> > at org.elasticsearch.action.support.master.  
> > TransportMasterNodeOperationAction.innerExecute(  
> > TransportMasterNodeOperationAction.java:140)  
> > at org.elasticsearch.action.support.master.  
> > TransportMasterNodeOperationAction.doExecute(  
> > TransportMasterNodeOperationAction.java:94)  
> > at org.elasticsearch.action.support.master.  
> > TransportMasterNodeOperationAction.doExecute(  
> > TransportMasterNodeOperationAction.java:42)  
> > at org.elasticsearch.action.support.TransportAction.execute(  
> > TransportAction.java:61)  
> > at org.elasticsearch.action.support.master.  
> > TransportMasterNodeOperationAction.execute(  
> > TransportMasterNodeOperationAction.java:89)  
> > at org.elasticsearch.action.support.master.  
> > TransportMasterNodeOperationAction$TransportHandler.messageReceived(  
> > TransportMasterNodeOperationAction.java:266)  
> > at org.elasticsearch.action.support.master.  
> > TransportMasterNodeOperationAction$TransportHandler.messageReceived(  
> > TransportMasterNodeOperationAction.java:250)  
> > at org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest  
> > (MessageChannelHandler.java:211)  
> > at org.elasticsearch.transport.netty.MessageChannelHandler.  
> > messageReceived(MessageChannelHandler.java:108)  
> > at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.  
> > handleUpstream(SimpleChannelUpstreamHandler.java:70)  
> > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
> > sendUpstream(DefaultChannelPipeline.java:564)  
> > at org.elasticsearch.common.netty.channel.  
> > DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(  
> > DefaultChannelPipeline.java:791)  
> > at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(  
> > Channels.java:296)  
> > at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.  
> > unfoldAndFireMessageReceived(FrameDecoder.java:462)  
> > at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.  
> > callDecode(FrameDecoder.java:443)  
> > at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.  
> > messageReceived(FrameDecoder.java:303)  
> > at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.  
> > handleUpstream(SimpleChannelUpstreamHandler.java:70)  
> > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
> > sendUpstream(DefaultChannelPipeline.java:564)  
> > at org.elasticsearch.common.netty.channel.  
> > DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(  
> > DefaultChannelPipeline.java:791)  
> > at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(  
> > OpenChannelsHandler.java:74)  
> > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
> > sendUpstream(DefaultChannelPipeline.java:564)  
> > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
> > sendUpstream(DefaultChannelPipeline.java:559)  
> > at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(  
> > Channels.java:268)  
> > at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(  
> > Channels.java:255)  
> > at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(  
> > NioWorker.java:88)  
> > at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.  
> > process(AbstractNioWorker.java:109)  
> > at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector  
> > .run(AbstractNioSelector.java:312)  
> > at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.  
> > run(AbstractNioWorker.java:90)  
> > at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(  
> > NioWorker.java:178)  
> > at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(  
> > ThreadRenamingRunnable.java:108)  
> > at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.  
> > run(DeadLockProofWorker.java:42)  
> > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(  
> > ThreadPoolExecutor.java:895)  
> > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor  
> > .java:918)  
> > ... 1 more
> > 
> > Could you please help me on that issue?
> > 
> > thanks guys
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [August 22, 2013, 5:16pm UTC](https://discuss.elastic.co/t/retrieving-the-clusters-state-with-indices-filters/13288/4 "2013-08-22T17:16:21Z")

</div>

I missed that very important part of your original email. Perhaps I am  
misunderstanding your usecase, but you want to have an alias on an index  
that does not exist? Ailas information is stored in the index metadata and  
aggregated from each index into the cluster state. No index = no alias.  
An IndexMissingException sound appropriate.

Cheers,

Ivan

On Thu, Aug 22, 2013 at 10:04 AM, [didier.baquier@gmail.com](mailto:didier.baquier@gmail.com) wrote:

> Thanks Ivan,
> 
> I presume that you tried with a non-existing index?
> 
> is someone can try on 0.90.3? could be a great help!
> 
> thanks
> 
> Le jeudi 22 août 2013 10:00:18 UTC-7, Ivan Brusic a écrit :
> 
> > I run some similar code and it works fine on 0.90.2. If it truly is a  
> > regression bug, one of these issues might have affected it:
> > 
> > [https://github.com/\*\*elasticsearch/elasticsearch/](https://github.com/**elasticsearch/elasticsearch/)\*\*  
> > issues?direction=desc&labels=\*\*v0.90.3&page=1&sort=updated&\*\*state=closed[https://github.com/elasticsearch/elasticsearch/issues?direction=desc&labels=v0.90.3&page=1&sort=updated&state=closed](https://github.com/elasticsearch/elasticsearch/issues?direction=desc&labels=v0.90.3&page=1&sort=updated&state=closed)
> > 
> > Cheers,
> > 
> > Ivan
> > 
> > On Wed, Aug 21, 2013 at 1:56 PM, [didier....@gmail.com](mailto:didier....@gmail.com) wrote:
> > 
> > > Hi folks,
> > > 
> > > I am currently updating my app to use the latest version of ES (0.90.3),  
> > > before I was using (0.19.12).
> > > 
> > > I had the following line to retrieve the state of the cluster with a  
> > > filter on indices :
> > > 
> > > val clusterState = client.admin().cluster().prepa**reState().  
> > > setFilterIndices(ali**asName).execute().actionGet().\*\*getState()
> > > 
> > > The aliasName could be an existing index or not. It was perfectly  
> > > working on 0.19.12.
> > > 
> > > Now the actionGet() method throws an exception if the aliasName is not  
> > > an existing index.
> > > 
> > > java.lang.reflect.InvocationTa**rgetException  
> > > at sun.reflect.NativeMethodAccess**orImpl.invoke0(Native Method)  
> > > at sun.reflect.NativeMethodAccess**orImpl.invoke(NativeMethodAcce**  
> > > ssorImpl.java:39)  
> > > at sun.reflect.DelegatingMethodAc**cessorImpl.invoke(DelegatingMe**  
> > > thodAccessorImpl.java:25)  
> > > at java.lang.reflect.Method.invok**e(Method.java:597)  
> > > at org.codehaus.mojo.exec.ExecJav**aMojo$1.run(ExecJavaMojo.java:**297)  
> > > at java.lang.Thread.run(Thread.ja**va:680)  
> > > Caused by: org.elasticsearch.indices.Inde**xMissingException: [en\_us\_old  
> > > ] missing  
> > > at org.elasticsearch.cluster.meta**data.MetaData.concreteIndices(\*\*  
> > > MetaData.java:529)  
> > > at org.elasticsearch.cluster.meta **data.MetaData.concreteIndicesI**  
> > > gnoreMissing(MetaData.java:509\*\*)  
> > > at org.elasticsearch.action.admin\*\*.cluster.state.TransportCluste\*\*  
> > > rStateAction.masterOperation(T **ransportClusterStateAction.jav** a:101)  
> > > at org.elasticsearch.action.admin\*\*.cluster.state.TransportCluste\*\*  
> > > rStateAction.masterOperation(T **ransportClusterStateAction.jav** a:42)  
> > > at org.elasticsearch.action.suppo **rt.master.TransportMasterNodeO**  
> > > perationAction$2.run(Transport **MasterNodeOperationAction.java** :144)  
> > > at org.elasticsearch.common.util. **concurrent.MoreExecutors$**  
> > > SameThreadExecutorService.exec**ute(MoreExecutors.java:293)  
> > > at org.elasticsearch.action.suppo**rt.master.TransportMasterNodeO\*\*  
> > > perationAction.innerExecute(Tr **ansportMasterNodeOperationActi** on.java:  
> > > 140)  
> > > at org.elasticsearch.action.suppo **rt.master.TransportMasterNodeO**  
> > > perationAction.doExecute(Trans**portMasterNodeOperationAction.java:94)  
> > > at org.elasticsearch.action.support.master.TransportMasterNodeO**  
> > > perationAction.doExecute(Trans**portMasterNodeOperationAction.java:42)  
> > > at org.elasticsearch.action.support.TransportAction.execute(Tra**  
> > > nsportAction.java:61)  
> > > at org.elasticsearch.action.suppo **rt.master.TransportMasterNodeO**  
> > > perationAction.execute(Transpo **rtMasterNodeOperationAction.ja** va:89)  
> > > at org.elasticsearch.action.suppo **rt.master.TransportMasterNodeO**  
> > > perationAction$ **TransportHandler.messageReceiv** ed(  
> > > TransportMasterNodeOperatio**nAction.java:266)  
> > > at org.elasticsearch.action.suppo**rt.master.TransportMasterNodeO\*\*  
> > > perationAction$ **TransportHandler.messageReceiv** ed(  
> > > TransportMasterNodeOperatio**nAction.java:250)  
> > > at org.elasticsearch.transport.ne**tty.MessageChannelHandler.hand\*\*  
> > > leRequest(MessageChannelHandle**r.java:211)  
> > > at org.elasticsearch.transport.ne**tty.MessageChannelHandler.mess\*\*  
> > > ageReceived(MessageChannelHand**ler.java:108)  
> > > at org.elasticsearch.common.netty**.channel.SimpleChannelUpstream\*\*  
> > > Handler.handleUpstream(SimpleC**hannelUpstreamHandler.java:70)  
> > > at org.elasticsearch.common.netty **.channel.DefaultChannelPipelin** e.  
> > > sendUpstream(DefaultChannelP**ipeline.java:564)  
> > > at org.elasticsearch.common.netty\*\*.channel.DefaultChannelPipelin\*\*  
> > > e$DefaultChannelHandlerContext\*\*.sendUpstream(DefaultChannelPi**peline.  
> > > java:791)  
> > > at org.elasticsearch.common.netty**.channel.Channels.fireMessageR\*\*  
> > > eceived(Channels.java:296)  
> > > at org.elasticsearch.common.netty\*\*.handler.codec.frame.FrameDeco**der.  
> > > unfoldAndFireMessageReceiv**ed(FrameDecoder.java:462)  
> > > at org.elasticsearch.common.netty\*\*.handler.codec.frame.FrameDeco**der.  
> > > callDecode(FrameDecoder.ja**va:443)  
> > > at org.elasticsearch.common.netty\*\*.handler.codec.frame.FrameDeco**der.  
> > > messageReceived(FrameDecod**er.java:303)  
> > > at org.elasticsearch.common.netty\*\*.channel.SimpleChannelUpstream\*\*  
> > > Handler.handleUpstream(SimpleC**hannelUpstreamHandler.java:70)  
> > > at org.elasticsearch.common.netty **.channel.DefaultChannelPipelin** e.  
> > > sendUpstream(DefaultChannelP**ipeline.java:564)  
> > > at org.elasticsearch.common.netty\*\*.channel.DefaultChannelPipelin\*\*  
> > > e$DefaultChannelHandlerContext\*\*.sendUpstream(DefaultChannelPi**peline.  
> > > java:791)  
> > > at org.elasticsearch.common.netty**.OpenChannelsHandler.handleUps\*\*  
> > > tream(OpenChannelsHandler.java\*\*:74)  
> > > at org.elasticsearch.common.netty\*\*.channel.DefaultChannelPipelin**e.  
> > > sendUpstream(DefaultChannelP**ipeline.java:564)  
> > > at org.elasticsearch.common.netty\*\*.channel.DefaultChannelPipelin**e.  
> > > sendUpstream(DefaultChannelP**ipeline.java:559)  
> > > at org.elasticsearch.common.netty\*\*.channel.Channels.fireMessageR\*\*  
> > > eceived(Channels.java:268)  
> > > at org.elasticsearch.common.netty\*\*.channel.Channels.fireMessageR\*\*  
> > > eceived(Channels.java:255)  
> > > at org.elasticsearch.common.netty\*\*.channel.socket.nio.NioWorker.**read  
> > > (NioWorker.java:88)  
> > > at org.elasticsearch.common.netty**.channel.socket.nio.AbstractNi\*\*  
> > > oWorker.process(AbstractNioWor**ker.java:109)  
> > > at org.elasticsearch.common.netty**.channel.socket.nio.AbstractNi\*\*  
> > > oSelector.run(AbstractNioSelec**tor.java:312)  
> > > at org.elasticsearch.common.netty**.channel.socket.nio.AbstractNi\*\*  
> > > oWorker.run(AbstractNioWorker.**java:90)  
> > > at org.elasticsearch.common.netty **.channel.socket.nio.NioWorker.** run(  
> > > NioWorker.java:178)  
> > > at org.elasticsearch.common.netty **.util.ThreadRenamingRunnable.r** un(  
> > > ThreadRenamingRunnable.java**:108)  
> > > at org.elasticsearch.common.netty\*\*.util.internal.DeadLockProofWo\*\*  
> > > rker$1.run(DeadLockProofWorker\*\*.java:42)  
> > > at java.util.concurrent.ThreadPoo**lExecutor$Worker.runTask(Threa**  
> > > dPoolExecutor.java:895)  
> > > at java.util.concurrent.ThreadPoo**lExecutor$Worker.run(ThreadPoo**  
> > > lExecutor.java:918)  
> > > ... 1 more
> > > 
> > > Could you please help me on that issue?
> > > 
> > > thanks guys
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > .
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![didier\_baquier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/didier_baquier/32/2055_2.png) [@didier\_baquier](https://discuss.elastic.co/u/didier_baquier)\
**Post date:** [August 22, 2013, 5:26pm UTC](https://discuss.elastic.co/t/retrieving-the-clusters-state-with-indices-filters/13288/5 "2013-08-22T17:26:20Z")

</div>

I just want to retrieve the list of the existing indices related to my  
alias (could be 0 index). To do so, I am using the meta data of the cluster  
state.

if you are familiar with scala, here is what I am doing ( it was working on  
0.19.12)  
val clusterState =  
client.admin().cluster().prepareState().setFilterIndices(aliasName).execute().actionGet().getState()  
Option(clusterState.metaData().aliases().get(aliasName)).map { \_.keySet()  
}.toList.flatten

if it is not possible to do something like that anymore, how can I test if  
my alias is related to at least 1 index?

thanks for your help

Le jeudi 22 août 2013 10:16:21 UTC-7, Ivan Brusic a écrit :

> I missed that very important part of your original email. Perhaps I am  
> misunderstanding your usecase, but you want to have an alias on an index  
> that does not exist? Ailas information is stored in the index metadata and  
> aggregated from each index into the cluster state. No index = no alias.  
> An IndexMissingException sound appropriate.
> 
> Cheers,
> 
> Ivan
> 
> On Thu, Aug 22, 2013 at 10:04 AM, \<[didier....@gmail.com](mailto:didier....@gmail.com) \<javascript:\>\>wrote:
> 
> > Thanks Ivan,
> > 
> > I presume that you tried with a non-existing index?
> > 
> > is someone can try on 0.90.3? could be a great help!
> > 
> > thanks
> > 
> > Le jeudi 22 août 2013 10:00:18 UTC-7, Ivan Brusic a écrit :
> > 
> > > I run some similar code and it works fine on 0.90.2. If it truly is a  
> > > regression bug, one of these issues might have affected it:
> > > 
> > > [https://github.com/\*\*elasticsearch/elasticsearch/](https://github.com/**elasticsearch/elasticsearch/)\*\*  
> > > issues?direction=desc&labels= **v0.90.3&page=1&sort=updated&**  
> > > state=closed[https://github.com/elasticsearch/elasticsearch/issues?direction=desc&labels=v0.90.3&page=1&sort=updated&state=closed](https://github.com/elasticsearch/elasticsearch/issues?direction=desc&labels=v0.90.3&page=1&sort=updated&state=closed)
> > > 
> > > Cheers,
> > > 
> > > Ivan
> > > 
> > > On Wed, Aug 21, 2013 at 1:56 PM, [didier....@gmail.com](mailto:didier....@gmail.com) wrote:
> > > 
> > > > Hi folks,
> > > > 
> > > > I am currently updating my app to use the latest version of ES  
> > > > (0.90.3), before I was using (0.19.12).
> > > > 
> > > > I had the following line to retrieve the state of the cluster with a  
> > > > filter on indices :
> > > > 
> > > > val clusterState = client.admin().cluster().prepa**reState().  
> > > > setFilterIndices(ali**asName).execute().actionGet().\*\*getState()
> > > > 
> > > > The aliasName could be an existing index or not. It was perfectly  
> > > > working on 0.19.12.
> > > > 
> > > > Now the actionGet() method throws an exception if the aliasName is not  
> > > > an existing index.
> > > > 
> > > > java.lang.reflect.InvocationTa**rgetException  
> > > > at sun.reflect.NativeMethodAccess**orImpl.invoke0(Native Method)  
> > > > at sun.reflect.NativeMethodAccess**orImpl.invoke(NativeMethodAcce**  
> > > > ssorImpl.java:39)  
> > > > at sun.reflect.DelegatingMethodAc**cessorImpl.invoke(DelegatingMe**  
> > > > thodAccessorImpl.java:25)  
> > > > at java.lang.reflect.Method.invok**e(Method.java:597)  
> > > > at org.codehaus.mojo.exec.ExecJav**aMojo$1.run(ExecJavaMojo.java:**297  
> > > > )  
> > > > at java.lang.Thread.run(Thread.ja**va:680)  
> > > > Caused by: org.elasticsearch.indices.Inde**xMissingException: [  
> > > > en\_us\_old] missing  
> > > > at org.elasticsearch.cluster.meta**data.MetaData.concreteIndices(\*\*  
> > > > MetaData.java:529)  
> > > > at org.elasticsearch.cluster.meta **data.MetaData.concreteIndicesI**  
> > > > gnoreMissing(MetaData.java:509\*\*)  
> > > > at org.elasticsearch.action.admin\*\*.cluster.state.TransportCluste\*\*  
> > > > rStateAction.masterOperation(T **ransportClusterStateAction.jav** a:101)  
> > > > at org.elasticsearch.action.admin\*\*.cluster.state.TransportCluste\*\*  
> > > > rStateAction.masterOperation(T **ransportClusterStateAction.jav** a:42)  
> > > > at org.elasticsearch.action.suppo **rt.master.TransportMasterNodeO**  
> > > > perationAction$2.run(Transport **MasterNodeOperationAction.java** :144)  
> > > > at org.elasticsearch.common.util. **concurrent.MoreExecutors$**  
> > > > SameThreadExecutorService.exec**ute(MoreExecutors.java:293)  
> > > > at org.elasticsearch.action.suppo**rt.master.TransportMasterNodeO\*\*  
> > > > perationAction.innerExecute(Tr **ansportMasterNodeOperationActi** on.java  
> > > > :140)  
> > > > at org.elasticsearch.action.suppo **rt.master.TransportMasterNodeO**  
> > > > perationAction.doExecute(Trans**portMasterNodeOperationAction.java:94  
> > > > )  
> > > > at org.elasticsearch.action.support.master.TransportMasterNodeO**  
> > > > perationAction.doExecute(Trans**portMasterNodeOperationAction.java:42  
> > > > )  
> > > > at org.elasticsearch.action.support.TransportAction.execute(Tra**  
> > > > nsportAction.java:61)  
> > > > at org.elasticsearch.action.suppo **rt.master.TransportMasterNodeO**  
> > > > perationAction.execute(Transpo **rtMasterNodeOperationAction.ja** va:89)  
> > > > at org.elasticsearch.action.suppo **rt.master.TransportMasterNodeO**  
> > > > perationAction$ **TransportHandler.messageReceiv** ed(  
> > > > TransportMasterNodeOperatio**nAction.java:266)  
> > > > at org.elasticsearch.action.suppo**rt.master.TransportMasterNodeO\*\*  
> > > > perationAction$ **TransportHandler.messageReceiv** ed(  
> > > > TransportMasterNodeOperatio**nAction.java:250)  
> > > > at org.elasticsearch.transport.ne**tty.MessageChannelHandler.hand\*\*  
> > > > leRequest(MessageChannelHandle**r.java:211)  
> > > > at org.elasticsearch.transport.ne**tty.MessageChannelHandler.mess\*\*  
> > > > ageReceived(MessageChannelHand**ler.java:108)  
> > > > at org.elasticsearch.common.netty**.channel.SimpleChannelUpstream\*\*  
> > > > Handler.handleUpstream(SimpleC**hannelUpstreamHandler.java:70)  
> > > > at org.elasticsearch.common.netty **.channel.DefaultChannelPipelin** e.  
> > > > sendUpstream(DefaultChannelP**ipeline.java:564)  
> > > > at org.elasticsearch.common.netty\*\*.channel.DefaultChannelPipelin\*\*  
> > > > e$DefaultChannelHandlerContext\*\*.sendUpstream(DefaultChannelPi**peline.  
> > > > java:791)  
> > > > at org.elasticsearch.common.netty**.channel.Channels.fireMessageR\*\*  
> > > > eceived(Channels.java:296)  
> > > > at org.elasticsearch.common.netty\*\*.handler.codec.frame.FrameDeco**der  
> > > > .unfoldAndFireMessageReceiv**ed(FrameDecoder.java:462)  
> > > > at org.elasticsearch.common.netty\*\*.handler.codec.frame.FrameDeco**der  
> > > > .callDecode(FrameDecoder.ja**va:443)  
> > > > at org.elasticsearch.common.netty\*\*.handler.codec.frame.FrameDeco**der  
> > > > .messageReceived(FrameDecod**er.java:303)  
> > > > at org.elasticsearch.common.netty\*\*.channel.SimpleChannelUpstream\*\*  
> > > > Handler.handleUpstream(SimpleC**hannelUpstreamHandler.java:70)  
> > > > at org.elasticsearch.common.netty **.channel.DefaultChannelPipelin** e.  
> > > > sendUpstream(DefaultChannelP**ipeline.java:564)  
> > > > at org.elasticsearch.common.netty\*\*.channel.DefaultChannelPipelin\*\*  
> > > > e$DefaultChannelHandlerContext\*\*.sendUpstream(DefaultChannelPi**peline.  
> > > > java:791)  
> > > > at org.elasticsearch.common.netty**.OpenChannelsHandler.handleUps\*\*  
> > > > tream(OpenChannelsHandler.java\*\*:74)  
> > > > at org.elasticsearch.common.netty\*\*.channel.DefaultChannelPipelin**e.  
> > > > sendUpstream(DefaultChannelP**ipeline.java:564)  
> > > > at org.elasticsearch.common.netty\*\*.channel.DefaultChannelPipelin**e.  
> > > > sendUpstream(DefaultChannelP**ipeline.java:559)  
> > > > at org.elasticsearch.common.netty\*\*.channel.Channels.fireMessageR\*\*  
> > > > eceived(Channels.java:268)  
> > > > at org.elasticsearch.common.netty\*\*.channel.Channels.fireMessageR\*\*  
> > > > eceived(Channels.java:255)  
> > > > at org.elasticsearch.common.netty\*\*.channel.socket.nio.NioWorker.\*\*  
> > > > read(NioWorker.java:88)  
> > > > at org.elasticsearch.common.netty\*\*.channel.socket.nio.AbstractNi\*\*  
> > > > oWorker.process(AbstractNioWor**ker.java:109)  
> > > > at org.elasticsearch.common.netty**.channel.socket.nio.AbstractNi\*\*  
> > > > oSelector.run(AbstractNioSelec**tor.java:312)  
> > > > at org.elasticsearch.common.netty**.channel.socket.nio.AbstractNi\*\*  
> > > > oWorker.run(AbstractNioWorker.**java:90)  
> > > > at org.elasticsearch.common.netty **.channel.socket.nio.NioWorker.** run  
> > > > (NioWorker.java:178)  
> > > > at org.elasticsearch.common.netty **.util.ThreadRenamingRunnable.r** un(  
> > > > ThreadRenamingRunnable.java**:108)  
> > > > at org.elasticsearch.common.netty\*\*.util.internal.DeadLockProofWo\*\*  
> > > > rker$1.run(DeadLockProofWorker\*\*.java:42)  
> > > > at java.util.concurrent.ThreadPoo**lExecutor$Worker.runTask(Threa**  
> > > > dPoolExecutor.java:895)  
> > > > at java.util.concurrent.ThreadPoo**lExecutor$Worker.run(ThreadPoo**  
> > > > lExecutor.java:918)  
> > > > ... 1 more
> > > > 
> > > > Could you please help me on that issue?
> > > > 
> > > > thanks guys
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).
> > > > 
> > > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > .
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [August 22, 2013, 5:40pm UTC](https://discuss.elastic.co/t/retrieving-the-clusters-state-with-indices-filters/13288/6 "2013-08-22T17:40:08Z")

</div>

"I just want to retrieve the list of the existing indices related to my  
alias (could be 0 index)"

Not it can't. Each alias must have an index. Sounds like you are exploiting  
a bug which has been fixed.

--  
Ivan

On Thu, Aug 22, 2013 at 10:26 AM, [didier.baquier@gmail.com](mailto:didier.baquier@gmail.com) wrote:

> I just want to retrieve the list of the existing indices related to my  
> alias (could be 0 index). To do so, I am using the meta data of the cluster  
> state.
> 
> if you are familiar with scala, here is what I am doing ( it was working  
> on 0.19.12)  
> val clusterState =  
> client.admin().cluster().prepareState().setFilterIndices(aliasName).execute().actionGet().getState()  
> Option(clusterState.metaData().aliases().get(aliasName)).map { \_.keySet()  
> }.toList.flatten
> 
> if it is not possible to do something like that anymore, how can I test if  
> my alias is related to at least 1 index?
> 
> thanks for your help
> 
> Le jeudi 22 août 2013 10:16:21 UTC-7, Ivan Brusic a écrit :
> 
> > I missed that very important part of your original email. Perhaps I am  
> > misunderstanding your usecase, but you want to have an alias on an index  
> > that does not exist? Ailas information is stored in the index metadata and  
> > aggregated from each index into the cluster state. No index = no alias.  
> > An IndexMissingException sound appropriate.
> > 
> > Cheers,
> > 
> > Ivan
> > 
> > On Thu, Aug 22, 2013 at 10:04 AM, [didier....@gmail.com](mailto:didier....@gmail.com) wrote:
> > 
> > > Thanks Ivan,
> > > 
> > > I presume that you tried with a non-existing index?
> > > 
> > > is someone can try on 0.90.3? could be a great help!
> > > 
> > > thanks
> > > 
> > > Le jeudi 22 août 2013 10:00:18 UTC-7, Ivan Brusic a écrit :
> > > 
> > > > I run some similar code and it works fine on 0.90.2. If it truly is a  
> > > > regression bug, one of these issues might have affected it:
> > > > 
> > > > [https://github.com/\*\*elasticsear\*\*ch/elasticsearch/\*\*issues?](https://github.com/ **elasticsear** ch/elasticsearch/**issues?)\*\*  
> > > > direction=desc&labels=\*\*v0.90.3&\*\*page=1&sort=updated&\*\*state=\*\*closed[https://github.com/elasticsearch/elasticsearch/issues?direction=desc&labels=v0.90.3&page=1&sort=updated&state=closed](https://github.com/elasticsearch/elasticsearch/issues?direction=desc&labels=v0.90.3&page=1&sort=updated&state=closed)
> > > > 
> > > > Cheers,
> > > > 
> > > > Ivan
> > > > 
> > > > On Wed, Aug 21, 2013 at 1:56 PM, [didier....@gmail.com](mailto:didier....@gmail.com) wrote:
> > > > 
> > > > > Hi folks,
> > > > > 
> > > > > I am currently updating my app to use the latest version of ES  
> > > > > (0.90.3), before I was using (0.19.12).
> > > > > 
> > > > > I had the following line to retrieve the state of the cluster with a  
> > > > > filter on indices :
> > > > > 
> > > > > val clusterState = client.admin().cluster().prepa**reState().  
> > > > > setFilterIndices(ali**asName).execute().actionGet().\*\*\*\*getState()
> > > > > 
> > > > > The aliasName could be an existing index or not. It was perfectly  
> > > > > working on 0.19.12.
> > > > > 
> > > > > Now the actionGet() method throws an exception if the aliasName is not  
> > > > > an existing index.
> > > > > 
> > > > > java.lang.reflect.InvocationTa**rgetException  
> > > > > at sun.reflect.NativeMethodAccess**orImpl.invoke0(Native Method)  
> > > > > at sun.reflect.NativeMethodAccess**orImpl.invoke(NativeMethodAcce\*\*  
> > > > > \*\*ssorImpl.java:39)  
> > > > > at sun.reflect.DelegatingMethodAc**cessorImpl.invoke(DelegatingMe\*\*  
> > > > > **thodAccessorImpl.java:25)  
> > > > > at java.lang.reflect.Method.invoke(Method.java:597)  
> > > > > at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:**  
> > > > > **297)  
> > > > > at java.lang.Thread.run(Thread.java:680)  
> > > > > Caused by: org.elasticsearch.indices.IndexMissingException: [  
> > > > > en\_us\_old] missing  
> > > > > at org.elasticsearch.cluster.meta\*\*\*\*data.MetaData.concreteIndices(**  
> > > > > **MetaData.java:529)  
> > > > > at org.elasticsearch.cluster.meta\*\*\*\*data.MetaData.concreteIndicesI**  
> > > > > **gnoreMissing(MetaData.java:509**\*\*)  
> > > > > at org.elasticsearch.action.admin\*\*\*\*.cluster.state.TransportCluste\*\*  
> > > > > **rStateAction.masterOperation(TransportClusterStateAction.jav  
> > > > > a:101)  
> > > > > at org.elasticsearch.action.admin**\*\*.cluster.state.TransportCluste\*\*  
> > > > > **rStateAction.masterOperation(TransportClusterStateAction.jav  
> > > > > a:42)  
> > > > > at org.elasticsearch.action.suppo\*\*\*\*rt.master.TransportMasterNodeO**  
> > > > > **perationAction$2.run(TransportMasterNodeOperationAction.java  
> > > > > :144)  
> > > > > at org.elasticsearch.common.util.concurrent.MoreExecutors$SameT  
> > > > > hreadExecutorService.execute(MoreExecutors.java:293)  
> > > > > at org.elasticsearch.action.support.master.TransportMasterNodeO**  
> > > > > **perationAction.innerExecute(TransportMasterNodeOperationActi  
> > > > > on.java:140)  
> > > > > at org.elasticsearch.action.suppo\*\*\*\*rt.master.TransportMasterNodeO**  
> > > > > **perationAction.doExecute(TransportMasterNodeOperationAction.  
> > > > > java:94)  
> > > > > at org.elasticsearch.action.suppo\*\*\*\*rt.master.TransportMasterNodeO**  
> > > > > **perationAction.doExecute(TransportMasterNodeOperationAction.  
> > > > > java:42)  
> > > > > at org.elasticsearch.action.suppo\*\*\*\*rt.TransportAction.execute(Tra**  
> > > > > **nsportAction.java:61)  
> > > > > at org.elasticsearch.action.suppo\*\*\*\*rt.master.TransportMasterNodeO**  
> > > > > **perationAction.execute(TransportMasterNodeOperationAction.ja  
> > > > > va:89)  
> > > > > at org.elasticsearch.action.suppo\*\*\*\*rt.master.TransportMasterNodeO**  
> > > > > **perationAction$TransportHandler.messageReceiv** ed(TransportMas\*\*  
> > > > > terNodeOperatio **nAction.java:26** 6)  
> > > > > at org.elasticsearch.action.suppo**rt.master.TransportMasterNodeO\*\*  
> > > > > perationAction$TransportHandler.messageReceived(TransportMas\*\*  
> > > > > terNodeOperationAction.java:250)  
> > > > > at org.elasticsearch.transport.ne**tty.MessageChannelHandler.hand\*\*  
> > > > > **leRequest(MessageChannelHandler.java:211)  
> > > > > at org.elasticsearch.transport.netty.MessageChannelHandler.mess**  
> > > > > **ageReceived(MessageChannelHandler.java:108)  
> > > > > at org.elasticsearch.common.netty.channel.SimpleChannelUpstream**  
> > > > > **Handler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
> > > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipelin**  
> > > > > **e.sendUpstream(DefaultChannelPipeline.java:564)  
> > > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipelin**  
> > > > > **e$DefaultChannelHandlerContext** \*\*.sendUpstream(DefaultChannelPi\*\*\*\*  
> > > > > peline.java:791)  
> > > > > at org.elasticsearch.common.netty\*\*\*\*.channel.Channels.fireMessageR\*\*  
> > > > > **eceived(Channels.java:296)  
> > > > > at org.elasticsearch.common.netty**\*\*.handler.codec.frame.FrameDeco\*\*  
> > > > > **der.unfoldAndFireMessageReceived(FrameDecoder.java:462)  
> > > > > at org.elasticsearch.common.netty.handler.codec.frame.FrameDeco**  
> > > > > **der.callDecode(FrameDecoder.java:443)  
> > > > > at org.elasticsearch.common.netty.handler.codec.frame.FrameDeco**  
> > > > > **der.messageReceived(FrameDecoder.java:303)  
> > > > > at org.elasticsearch.common.netty.channel.SimpleChannelUpstream**  
> > > > > **Handler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
> > > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipelin**  
> > > > > **e.sendUpstream(DefaultChannelPipeline.java:564)  
> > > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipelin**  
> > > > > **e$DefaultChannelHandlerContext** \*\*.sendUpstream(DefaultChannelPi\*\*\*\*  
> > > > > peline.java:791)  
> > > > > at org.elasticsearch.common.netty\*\*\*\*.OpenChannelsHandler.handleUps\*\*  
> > > > > **tream(OpenChannelsHandler.java**\*\*:74)  
> > > > > at org.elasticsearch.common.netty\*\*\*\*.channel.DefaultChannelPipelin\*\*  
> > > > > **e.sendUpstream(DefaultChannelPipeline.java:564)  
> > > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipelin**  
> > > > > **e.sendUpstream(DefaultChannelPipeline.java:559)  
> > > > > at org.elasticsearch.common.netty.channel.Channels.fireMessageR**  
> > > > > **eceived(Channels.java:268)  
> > > > > at org.elasticsearch.common.netty**\*\*.channel.Channels.fireMessageR\*\*  
> > > > > **eceived(Channels.java:255)  
> > > > > at org.elasticsearch.common.netty**\*\*.channel.socket.nio.NioWorker.\*\*  
> > > > > **read(NioWorker.java:88)  
> > > > > at org.elasticsearch.common.netty**\*\*.channel.socket.nio.AbstractNi\*\*  
> > > > > **oWorker.process(AbstractNioWorker.java:109)  
> > > > > at org.elasticsearch.common.netty.channel.socket.nio.AbstractNi**  
> > > > > **oSelector.run(AbstractNioSelector.java:312)  
> > > > > at org.elasticsearch.common.netty.channel.socket.nio.AbstractNi**  
> > > > > **oWorker.run(AbstractNioWorker.java:90)  
> > > > > at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.**  
> > > > > **run(NioWorker.java:178)  
> > > > > at org.elasticsearch.common.netty**\*\*.util.ThreadRenamingRunnable.r\*\*  
> > > > > **un(ThreadRenamingRunnable.java**\*\*:108)  
> > > > > at org.elasticsearch.common.netty\*\*\*\*.util.internal.DeadLockProofWo\*\*  
> > > > > **rker$1.run(DeadLockProofWorker**\*\*.java:42)  
> > > > > at java.util.concurrent.ThreadPoo**lExecutor$Worker.runTask(Threa\*\*  
> > > > > \*\*dPoolExecutor.java:895)  
> > > > > at java.util.concurrent.ThreadPoo**lExecutor$Worker.run(ThreadPoo\*\*  
> > > > > \*\*lExecutor.java:918)  
> > > > > ... 1 more
> > > > > 
> > > > > Could you please help me on that issue?
> > > > > 
> > > > > thanks guys
> > > > > 
> > > > > --  
> > > > > You received this message because you are subscribed to the Google  
> > > > > Groups "elasticsearch" group.  
> > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > an email to elasticsearc...@\*\*googlegroups.\*\*com.
> > > > > 
> > > > > For more options, visit [https://groups.google.com/\*\*grou\*\*ps/opt\_out](https://groups.google.com/ **grou** ps/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > > .
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).  
> > > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > .
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![didier\_baquier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/didier_baquier/32/2055_2.png) [@didier\_baquier](https://discuss.elastic.co/u/didier_baquier)\
**Post date:** [August 22, 2013, 5:58pm UTC](https://discuss.elastic.co/t/retrieving-the-clusters-state-with-indices-filters/13288/7 "2013-08-22T17:58:18Z")

</div>

awww!

so there is no way to test if an alias is related to an index? is it like  
testing the existence of an index at the end right? is there another way to  
do something like that?

Le jeudi 22 août 2013 10:40:08 UTC-7, Ivan Brusic a écrit :

> "I just want to retrieve the list of the existing indices related to my  
> alias (could be 0 index)"
> 
> Not it can't. Each alias must have an index. Sounds like you are  
> exploiting a bug which has been fixed.
> 
> --  
> Ivan
> 
> On Thu, Aug 22, 2013 at 10:26 AM, \<[didier....@gmail.com](mailto:didier....@gmail.com) \<javascript:\>\>wrote:
> 
> > I just want to retrieve the list of the existing indices related to my  
> > alias (could be 0 index). To do so, I am using the meta data of the cluster  
> > state.
> > 
> > if you are familiar with scala, here is what I am doing ( it was working  
> > on 0.19.12)  
> > val clusterState =  
> > client.admin().cluster().prepareState().setFilterIndices(aliasName).execute().actionGet().getState()  
> > Option(clusterState.metaData().aliases().get(aliasName)).map { \_.keySet()  
> > }.toList.flatten
> > 
> > if it is not possible to do something like that anymore, how can I test  
> > if my alias is related to at least 1 index?
> > 
> > thanks for your help
> > 
> > Le jeudi 22 août 2013 10:16:21 UTC-7, Ivan Brusic a écrit :
> > 
> > > I missed that very important part of your original email. Perhaps I am  
> > > misunderstanding your usecase, but you want to have an alias on an index  
> > > that does not exist? Ailas information is stored in the index metadata and  
> > > aggregated from each index into the cluster state. No index = no alias.  
> > > An IndexMissingException sound appropriate.
> > > 
> > > Cheers,
> > > 
> > > Ivan
> > > 
> > > On Thu, Aug 22, 2013 at 10:04 AM, [didier....@gmail.com](mailto:didier....@gmail.com) wrote:
> > > 
> > > > Thanks Ivan,
> > > > 
> > > > I presume that you tried with a non-existing index?
> > > > 
> > > > is someone can try on 0.90.3? could be a great help!
> > > > 
> > > > thanks
> > > > 
> > > > Le jeudi 22 août 2013 10:00:18 UTC-7, Ivan Brusic a écrit :
> > > > 
> > > > > I run some similar code and it works fine on 0.90.2. If it truly is a  
> > > > > regression bug, one of these issues might have affected it:
> > > > > 
> > > > > [https://github.com/\*\*elasticsear\*\*ch/elasticsearch/\*\*issues?](https://github.com/ **elasticsear** ch/elasticsearch/**issues?)\*\*  
> > > > > direction=desc&labels=\*\*v0.90.3&\*\*page=1&sort=updated&\*\*state=\*\*closed[https://github.com/elasticsearch/elasticsearch/issues?direction=desc&labels=v0.90.3&page=1&sort=updated&state=closed](https://github.com/elasticsearch/elasticsearch/issues?direction=desc&labels=v0.90.3&page=1&sort=updated&state=closed)
> > > > > 
> > > > > Cheers,
> > > > > 
> > > > > Ivan
> > > > > 
> > > > > On Wed, Aug 21, 2013 at 1:56 PM, [didier....@gmail.com](mailto:didier....@gmail.com) wrote:
> > > > > 
> > > > > > Hi folks,
> > > > > > 
> > > > > > I am currently updating my app to use the latest version of ES  
> > > > > > (0.90.3), before I was using (0.19.12).
> > > > > > 
> > > > > > I had the following line to retrieve the state of the cluster with a  
> > > > > > filter on indices :
> > > > > > 
> > > > > > val clusterState = client.admin().cluster().prepa**reState().  
> > > > > > setFilterIndices(ali**asName).execute().actionGet().\*\*\*\*getState()
> > > > > > 
> > > > > > The aliasName could be an existing index or not. It was perfectly  
> > > > > > working on 0.19.12.
> > > > > > 
> > > > > > Now the actionGet() method throws an exception if the aliasName is  
> > > > > > not an existing index.
> > > > > > 
> > > > > > java.lang.reflect.InvocationTa**rgetException  
> > > > > > at sun.reflect.NativeMethodAccess**orImpl.invoke0(Native Method)  
> > > > > > at sun.reflect.NativeMethodAccess_orImpl.invoke(NativeMethodAcce  
> > > > > > **ssorImpl.java:39)  
> > > > > > at sun.reflect.DelegatingMethodAc**cessorImpl.invoke(DelegatingMe  
> > > > > > **thodAccessorImpl.java:25)  
> > > > > > at java.lang.reflect.Method.invok**_e(Method.java:597)  
> > > > > > at org.codehaus.mojo.exec.ExecJav**_aMojo$1.run(ExecJavaMojo.java:  
> > > > > > 297)  
> > > > > > at java.lang.Thread.run(Thread.ja_va:680)  
> > > > > > Caused by: org.elasticsearch.indices.Inde **** xMissingException: [  
> > > > > > en\_us\_old] missing  
> > > > > > at org.elasticsearch.cluster.meta**_data.MetaData.concreteIndices(  
> > > > > > **MetaData.java:529)  
> > > > > > at org.elasticsearch.cluster.meta**_data.MetaData.concreteIndicesI\*  
> > > > > > _**gnoreMissing(MetaData.java:509**_\*)  
> > > > > > at org.elasticsearch.action.admin\*\*\*\*.cluster.state.TransportCluste\*  
> > > > > > _**rStateAction.masterOperation(T**__ransportClusterStateAction.jav\*\*  
> > > > > > **a:101)  
> > > > > > at org.elasticsearch.action.admin**_\*.cluster.state.TransportCluste\*  
> > > > > > _**rStateAction.masterOperation(T**__ransportClusterStateAction.jav\*\*  
> > > > > > \*\*a:42)  
> > > > > > at org.elasticsearch.action.suppo__rt.master.TransportMasterNodeO  
> > > > > > **perationAction$2.run(Transport**MasterNodeOperationAction.java\*\*  
> > > > > > **:144)  
> > > > > > at org.elasticsearch.common.util.\*\*concurrent.MoreExecutors$  
> > > > > > SameT **hreadExecutorService.exec** ute(M**oreExecutors.java:293)  
> > > > > > at org.elasticsearch.action.suppo__rt.master.TransportMasterNodeO  
> > > > > > **perationAction.innerExecute(Tr**ansportMasterNodeOperationActi\*\*  
> > > > > > \*\*on.java:140)  
> > > > > > at org.elasticsearch.action.suppo__rt.master.TransportMasterNodeO  
> > > > > > **perationAction.doExecute(Trans**portMasterNodeOperationAction.\*\*  
> > > > > > \*\*java:94)  
> > > > > > at org.elasticsearch.action.suppo__rt.master.TransportMasterNodeO  
> > > > > > **perationAction.doExecute(Trans**portMasterNodeOperationAction.\*\*  
> > > > > > \*\*java:42)  
> > > > > > at org.elasticsearch.action.suppo__rt.TransportAction.execute(Tra  
> > > > > > **nsportAction.java:61)  
> > > > > > at org.elasticsearch.action.suppo**rt.master.TransportMasterNodeO_  
> > > > > > _**perationAction.execute(Transpo**__rtMasterNodeOperationAction.ja\*\*  
> > > > > > \*\*va:89)  
> > > > > > at org.elasticsearch.action.suppo_**_rt.master.TransportMasterNodeO_  
> > > > > > _perationAction$TransportHandler.messageReceived(TransportMas  
> > > > > > terNodeOperationAction.java:26_\*6)  
> > > > > > at org.elasticsearch.action.suppo**_rt.master.TransportMasterNodeO  
> > > > > > **perationAction$TransportHandler.messageReceiv** ed(TransportMas  
> > > > > > **terNodeOperatio** nAction.java:25\*0)  
> > > > > > at org.elasticsearch.transport.ne__tty.MessageChannelHandler.hand  
> > > > > > **leRequest(MessageChannelHandle**r.java:211)  
> > > > > > at org.elasticsearch.transport.ne__tty.MessageChannelHandler.mess  
> > > > > > **ageReceived(MessageChannelHand**ler.java:108)  
> > > > > > at org.elasticsearch.common.netty_\*\*\*.channel.SimpleChannelUpstream\*  
> > > > > > _**Handler.handleUpstream(SimpleC**__hannelUpstreamHandler.java:70)  
> > > > > > at org.elasticsearch.common.netty_\*\*\*.channel.DefaultChannelPipelin\*  
> > > > > > _**e.sendUpstream(DefaultChannelP**__ipeline.java:564)  
> > > > > > at org.elasticsearch.common.netty_\*\*\*.channel.DefaultChannelPipelin\*  
> > > > > > _ **e$DefaultChannelHandlerContext** _\*.sendUpstream(DefaultChannelPi\*\*  
> > > > > > **peline.java:791)  
> > > > > > at org.elasticsearch.common.netty**\*\*.channel.Channels.fireMessageR\*  
> > > > > > _**eceived(Channels.java:296)  
> > > > > > at org.elasticsearch.common.netty**_\*.handler.codec.frame.FrameDeco\*  
> > > > > > _ **der.unfoldAndFireMessageReceiv** __ed(FrameDecoder.java:462)  
> > > > > > at org.elasticsearch.common.netty_\*\*\*.handler.codec.frame.FrameDeco\*  
> > > > > > _**der.callDecode(FrameDecoder.ja**__va:443)  
> > > > > > at org.elasticsearch.common.netty_\*\*\*.handler.codec.frame.FrameDeco\*  
> > > > > > _**der.messageReceived(FrameDecod**__er.java:303)  
> > > > > > at org.elasticsearch.common.netty_\*\*\*.channel.SimpleChannelUpstream\*  
> > > > > > _**Handler.handleUpstream(SimpleC**__hannelUpstreamHandler.java:70)  
> > > > > > at org.elasticsearch.common.netty_\*\*\*.channel.DefaultChannelPipelin\*  
> > > > > > _**e.sendUpstream(DefaultChannelP**__ipeline.java:564)  
> > > > > > at org.elasticsearch.common.netty_\*\*\*.channel.DefaultChannelPipelin\*  
> > > > > > _ **e$DefaultChannelHandlerContext** _\*.sendUpstream(DefaultChannelPi\*\*  
> > > > > > **peline.java:791)  
> > > > > > at org.elasticsearch.common.netty**\*\*.OpenChannelsHandler.handleUps\*  
> > > > > > _**tream(OpenChannelsHandler.java**_\*:74)  
> > > > > > at org.elasticsearch.common.netty\*\*\*\*.channel.DefaultChannelPipelin\*  
> > > > > > _**e.sendUpstream(DefaultChannelP**__ipeline.java:564)  
> > > > > > at org.elasticsearch.common.netty_\*\*\*.channel.DefaultChannelPipelin\*  
> > > > > > _**e.sendUpstream(DefaultChannelP**__ipeline.java:559)  
> > > > > > at org.elasticsearch.common.netty_\*\*\*.channel.Channels.fireMessageR\*  
> > > > > > _**eceived(Channels.java:268)  
> > > > > > at org.elasticsearch.common.netty**_\*.channel.Channels.fireMessageR\*  
> > > > > > _**eceived(Channels.java:255)  
> > > > > > at org.elasticsearch.common.netty**_\*.channel.socket.nio.NioWorker.\*  
> > > > > > _**read(NioWorker.java:88)  
> > > > > > at org.elasticsearch.common.netty**_\*.channel.socket.nio.AbstractNi\*  
> > > > > > _**oWorker.process(AbstractNioWor**__ker.java:109)  
> > > > > > at org.elasticsearch.common.netty_\*\*\*.channel.socket.nio.AbstractNi\*  
> > > > > > _**oSelector.run(AbstractNioSelec**__tor.java:312)  
> > > > > > at org.elasticsearch.common.netty_\*\*\*.channel.socket.nio.AbstractNi\*  
> > > > > > _oWorker.run(AbstractNioWorker.**java:90)  
> > > > > > at org.elasticsearch.common.netty**.channel.socket.nio.NioWorker.  
> > > > > > **run(NioWorker.java:178)  
> > > > > > at org.elasticsearch.common.netty**.util.ThreadRenamingRunnable.r_  
> > > > > > _**un(ThreadRenamingRunnable.java**_\*:108)  
> > > > > > at org.elasticsearch.common.netty\*\*\*\*.util.internal.DeadLockProofWo\*  
> > > > > > _**rker$1.run(DeadLockProofWorker**_\*.java:42)  
> > > > > > at java.util.concurrent.ThreadPoo\*_lExecutor$Worker.runTask(Threa  
> > > > > > **dPoolExecutor.java:895)  
> > > > > > at java.util.concurrent.ThreadPoo**lExecutor$Worker.run(ThreadPoo_  
> > > > > > \*\*\*lExecutor.java:918)  
> > > > > > ... 1 more
> > > > > > 
> > > > > > Could you please help me on that issue?
> > > > > > 
> > > > > > thanks guys
> > > > > > 
> > > > > > --  
> > > > > > You received this message because you are subscribed to the Google  
> > > > > > Groups "elasticsearch" group.  
> > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > send an email to elasticsearc...@\*\*googlegroups.\*\*com.
> > > > > > 
> > > > > > For more options, visit [https://groups.google.com/\*\*grou\*\*ps/opt\_out](https://groups.google.com/ **grou** ps/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > > > .
> > > > > 
> > > > > --  
> > > > > You received this message because you are subscribed to the Google  
> > > > > Groups "elasticsearch" group.  
> > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > an email to elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).  
> > > > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > > .
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [August 22, 2013, 6:02pm UTC](https://discuss.elastic.co/t/retrieving-the-clusters-state-with-indices-filters/13288/8 "2013-08-22T18:02:56Z")

</div>

You can gather all the aliases and see if the one you are interested in  
exists.

// in Java so that you can see the return types  
ImmutableMap\<String, ImmutableMap\<String, AliasMetaData\>\> aliases =  
client.admin().cluster().state(new  
ClusterStateRequest()).actionGet().getState().getMetaData().aliases();

ImmutableMap\<String, AliasMetaData\> pAlias = aliases.get(aliasName);

On Thu, Aug 22, 2013 at 10:58 AM, [didier.baquier@gmail.com](mailto:didier.baquier@gmail.com) wrote:

> awww!
> 
> so there is no way to test if an alias is related to an index? is it like  
> testing the existence of an index at the end right? is there another way to  
> do something like that?
> 
> Le jeudi 22 août 2013 10:40:08 UTC-7, Ivan Brusic a écrit :
> 
> > "I just want to retrieve the list of the existing indices related to my  
> > alias (could be 0 index)"
> > 
> > Not it can't. Each alias must have an index. Sounds like you are  
> > exploiting a bug which has been fixed.
> > 
> > --  
> > Ivan
> > 
> > On Thu, Aug 22, 2013 at 10:26 AM, [didier....@gmail.com](mailto:didier....@gmail.com) wrote:
> > 
> > > I just want to retrieve the list of the existing indices related to my  
> > > alias (could be 0 index). To do so, I am using the meta data of the cluster  
> > > state.
> > > 
> > > if you are familiar with scala, here is what I am doing ( it was working  
> > > on 0.19.12)  
> > > val clusterState = client.admin().cluster().**prepareState().**  
> > > setFilterIndices(aliasName).\*\*execute().actionGet().**getState()  
> > > Option(clusterState.metaData()**.aliases().get(aliasName)).map {  
> > > \_.keySet() }.toList.flatten
> > > 
> > > if it is not possible to do something like that anymore, how can I test  
> > > if my alias is related to at least 1 index?
> > > 
> > > thanks for your help
> > > 
> > > Le jeudi 22 août 2013 10:16:21 UTC-7, Ivan Brusic a écrit :
> > > 
> > > > I missed that very important part of your original email. Perhaps I am  
> > > > misunderstanding your usecase, but you want to have an alias on an index  
> > > > that does not exist? Ailas information is stored in the index metadata and  
> > > > aggregated from each index into the cluster state. No index = no alias.  
> > > > An IndexMissingException sound appropriate.
> > > > 
> > > > Cheers,
> > > > 
> > > > Ivan
> > > > 
> > > > On Thu, Aug 22, 2013 at 10:04 AM, [didier....@gmail.com](mailto:didier....@gmail.com) wrote:
> > > > 
> > > > > Thanks Ivan,
> > > > > 
> > > > > I presume that you tried with a non-existing index?
> > > > > 
> > > > > is someone can try on 0.90.3? could be a great help!
> > > > > 
> > > > > thanks
> > > > > 
> > > > > Le jeudi 22 août 2013 10:00:18 UTC-7, Ivan Brusic a écrit :
> > > > > 
> > > > > > I run some similar code and it works fine on 0.90.2. If it truly is a  
> > > > > > regression bug, one of these issues might have affected it:
> > > > > > 
> > > > > > [https://github.com/\*\*elasticsear\*\*\*\*ch/elasticsearch/\*\*issues?](https://github.com/ **elasticsear**** ch/elasticsearch/**issues?)\*\*  
> > > > > > direct\*\*ion=desc&labels=\*\*v0.90.3&\*\*page=\*\*1&sort=updated& **state=**  
> > > > > > closed[https://github.com/elasticsearch/elasticsearch/issues?direction=desc&labels=v0.90.3&page=1&sort=updated&state=closed](https://github.com/elasticsearch/elasticsearch/issues?direction=desc&labels=v0.90.3&page=1&sort=updated&state=closed)
> > > > > > 
> > > > > > Cheers,
> > > > > > 
> > > > > > Ivan
> > > > > > 
> > > > > > On Wed, Aug 21, 2013 at 1:56 PM, [didier....@gmail.com](mailto:didier....@gmail.com) wrote:
> > > > > > 
> > > > > > > Hi folks,
> > > > > > > 
> > > > > > > I am currently updating my app to use the latest version of ES  
> > > > > > > (0.90.3), before I was using (0.19.12).
> > > > > > > 
> > > > > > > I had the following line to retrieve the state of the cluster with a  
> > > > > > > filter on indices :
> > > > > > > 
> > > > > > > val clusterState = client.admin().cluster().prepa**reState().  
> > > > > > > setFilterIndices(ali**asName).execute().actionGet().\*\*\*\*\*\*  
> > > > > > > getState()
> > > > > > > 
> > > > > > > The aliasName could be an existing index or not. It was perfectly  
> > > > > > > working on 0.19.12.
> > > > > > > 
> > > > > > > Now the actionGet() method throws an exception if the aliasName is  
> > > > > > > not an existing index.
> > > > > > > 
> > > > > > > java.lang.reflect.InvocationTa**rgetException  
> > > > > > > at sun.reflect.NativeMethodAccess**orImpl.invoke0(Native Method  
> > > > > > > )  
> > > > > > > at sun.reflect.NativeMethodAccess**orImpl.invoke(  
> > > > > > > NativeMethodAcce**ssorImpl.java:39)  
> > > > > > > at sun.reflect.DelegatingMethodAc**cessorImpl.invoke(  
> > > > > > > DelegatingMe**thodAccessorImpl.java:25)  
> > > > > > > at java.lang.reflect.Method.invok**e(Method.java:597)  
> > > > > > > at org.codehaus.mojo.exec.ExecJav**aMojo$1.run(ExecJavaMojo.  
> > > > > > > java:**297)  
> > > > > > > at java.lang.Thread.run(Thread.ja**va:680)  
> > > > > > > Caused by: org.elasticsearch.indices.Inde**xMissingException: [  
> > > > > > > en\_us\_old] missing  
> > > > > > > at org.elasticsearch.cluster.meta**data.MetaData.  
> > > > > > > concreteIndices(**MetaData.java:529)  
> > > > > > > at org.elasticsearch.cluster.meta**data.MetaData.  
> > > > > > > concreteIndicesI**gnoreMissing(MetaData.java:509**)  
> > > > > > > at org.elasticsearch.action.admin\*\*\*\*\*\*.cluster.state.  
> > > > > > > TransportCluste**rStateAction.masterOperation(T**  
> > > > > > > ransportClusterStateAction.jav**a:101)  
> > > > > > > at org.elasticsearch.action.admin**.cluster.state.  
> > > > > > > TransportCluste**rStateAction.masterOperation(T**  
> > > > > > > ransportClusterStateAction.jav**a:42)  
> > > > > > > at org.elasticsearch.action.suppo**rt.master.  
> > > > > > > TransportMasterNodeO**perationAction$2.run(Transport**  
> > > > > > > MasterNodeOperationAction.java\*\*\*\*\*\*:144)  
> > > > > > > at org.elasticsearch.common.util.**concurrent.MoreExecutors$  
> > > > > > > SameT **hreadExecutorService.exec** ute(MoreExecutors.java:293)  
> > > > > > > at org.elasticsearch.action.suppo**rt.master.  
> > > > > > > TransportMasterNodeO**perationAction.innerExecute(Tr**  
> > > > > > > ansportMasterNodeOperationActi**on.java:140)  
> > > > > > > at org.elasticsearch.action.suppo**rt.master.  
> > > > > > > TransportMasterNodeO**perationAction.doExecute(Trans**  
> > > > > > > portMasterNodeOperationAction.**java:94)  
> > > > > > > at org.elasticsearch.action.suppo**rt.master.  
> > > > > > > TransportMasterNodeO**perationAction.doExecute(Trans**  
> > > > > > > portMasterNodeOperationAction.**java:42)  
> > > > > > > at org.elasticsearch.action.suppo**rt.TransportAction.execute(  
> > > > > > > Tra**nsportAction.java:61)  
> > > > > > > at org.elasticsearch.action.suppo**rt.master.  
> > > > > > > TransportMasterNodeO**perationAction.execute(Transpo**  
> > > > > > > rtMasterNodeOperationAction.ja**va:89)  
> > > > > > > at org.elasticsearch.action.suppo**rt.master.  
> > > > > > > TransportMasterNodeO**perationAction$\*\*TransportHandler.  
> > > > > > > messageReceiv**ed(TransportMas**terNodeOperationAction.java:26  
> > > > > > > 6)  
> > > > > > > at org.elasticsearch.action.suppo**rt.master.  
> > > > > > > TransportMasterNodeO**perationAction$\*\*TransportHandler.  
> > > > > > > messageReceiv**ed(TransportMas**terNodeOperationAction.java:25  
> > > > > > > 0)  
> > > > > > > at org.elasticsearch.transport.ne**tty.MessageChannelHandler.  
> > > > > > > hand**leRequest(MessageChannelHandle**r.java:211)  
> > > > > > > at org.elasticsearch.transport.ne**tty.MessageChannelHandler.  
> > > > > > > mess**ageReceived(MessageChannelHand**ler.java:108)  
> > > > > > > at org.elasticsearch.common.netty**.channel.  
> > > > > > > SimpleChannelUpstream**Handler.handleUpstream(SimpleC**  
> > > > > > > hannelUpstreamHandler.java:70)  
> > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.  
> > > > > > > DefaultChannelPipelin**e.sendUpstream(DefaultChannelP**  
> > > > > > > ipeline.java:564)  
> > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.  
> > > > > > > DefaultChannelPipelin **e$DefaultChannelHandlerContext**.  
> > > > > > > sendUpstream(DefaultChannelPi**peline.java:791)  
> > > > > > > at org.elasticsearch.common.netty**.channel.Channels.  
> > > > > > > fireMessageR**eceived(Channels.java:296)  
> > > > > > > at org.elasticsearch.common.netty**.handler.codec.frame.  
> > > > > > > FrameDeco **der.unfoldAndFireMessageReceiv** ed(FrameDecoder.  
> > > > > > > java:462)  
> > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.handler.codec.frame.  
> > > > > > > FrameDeco**der.callDecode(FrameDecoder.ja**va:443)  
> > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.handler.codec.frame.  
> > > > > > > FrameDeco**der.messageReceived(FrameDecod**er.java:303)  
> > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.  
> > > > > > > SimpleChannelUpstream**Handler.handleUpstream(SimpleC**  
> > > > > > > hannelUpstreamHandler.java:70)  
> > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.  
> > > > > > > DefaultChannelPipelin**e.sendUpstream(DefaultChannelP**  
> > > > > > > ipeline.java:564)  
> > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.  
> > > > > > > DefaultChannelPipelin **e$DefaultChannelHandlerContext**.  
> > > > > > > sendUpstream(DefaultChannelPi**peline.java:791)  
> > > > > > > at org.elasticsearch.common.netty**.OpenChannelsHandler.  
> > > > > > > handleUps**tream(OpenChannelsHandler.java**:74)  
> > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.  
> > > > > > > DefaultChannelPipelin**e.sendUpstream(DefaultChannelP**  
> > > > > > > ipeline.java:564)  
> > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.  
> > > > > > > DefaultChannelPipelin**e.sendUpstream(DefaultChannelP**  
> > > > > > > ipeline.java:559)  
> > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.Channels.  
> > > > > > > fireMessageR**eceived(Channels.java:268)  
> > > > > > > at org.elasticsearch.common.netty**.channel.Channels.  
> > > > > > > fireMessageR**eceived(Channels.java:255)  
> > > > > > > at org.elasticsearch.common.netty**.channel.socket.nio.  
> > > > > > > NioWorker.**read(NioWorker.java:88)  
> > > > > > > at org.elasticsearch.common.netty**.channel.socket.nio.  
> > > > > > > AbstractNi**oWorker.process(AbstractNioWor**ker.java:109)  
> > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.socket.nio.  
> > > > > > > AbstractNi**oSelector.run(AbstractNioSelec**tor.java:312)  
> > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.socket.nio.  
> > > > > > > AbstractNi**oWorker.run(AbstractNioWorker.java:90)  
> > > > > > > at org.elasticsearch.common.netty.channel.socket.nio.  
> > > > > > > NioWorker.run(NioWorker.java:178)  
> > > > > > > at org.elasticsearch.common.netty.util.ThreadRenamingRunnable  
> > > > > > > .r**un(ThreadRenamingRunnable.java\*\*\*\*\*\*:108)  
> > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.util.internal.  
> > > > > > > DeadLockProofWo**rker$1.run(DeadLockProofWorker**.java:42)  
> > > > > > > at java.util.concurrent.ThreadPoo**lExecutor$Worker.runTask(  
> > > > > > > Threa**dPoolExecutor.java:895)  
> > > > > > > at java.util.concurrent.ThreadPoo**lExecutor$Worker.run(  
> > > > > > > ThreadPoo**lExecutor.java:918)  
> > > > > > > ... 1 more
> > > > > > > 
> > > > > > > Could you please help me on that issue?
> > > > > > > 
> > > > > > > thanks guys
> > > > > > > 
> > > > > > > --  
> > > > > > > You received this message because you are subscribed to the Google  
> > > > > > > Groups "elasticsearch" group.  
> > > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > > send an email to elasticsearc...@\*\*googlegroups. **c** om.
> > > > > > > 
> > > > > > > For more options, visit [https://groups.google.com/\*\*grou](https://groups.google.com/**grou)\*\*\*\*  
> > > > > > > ps/opt\_out [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > > 
> > > > > > --  
> > > > > > You received this message because you are subscribed to the Google  
> > > > > > Groups "elasticsearch" group.  
> > > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > > an email to elasticsearc...@\*\*googlegroups.\*\*com.  
> > > > > > For more options, visit [https://groups.google.com/\*\*grou\*\*ps/opt\_out](https://groups.google.com/ **grou** ps/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > > > .
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).  
> > > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > .
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![didier\_baquier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/didier_baquier/32/2055_2.png) [@didier\_baquier](https://discuss.elastic.co/u/didier_baquier)\
**Post date:** [August 22, 2013, 6:13pm UTC](https://discuss.elastic.co/t/retrieving-the-clusters-state-with-indices-filters/13288/9 "2013-08-22T18:13:09Z")

</div>

Great! I am gonna try that solution today, I'll give you some feedbacks.

thanks

Le jeudi 22 août 2013 11:02:56 UTC-7, Ivan Brusic a écrit :

> You can gather all the aliases and see if the one you are interested in  
> exists.
> 
> // in Java so that you can see the return types  
> ImmutableMap\<String, ImmutableMap\<String, AliasMetaData\>\> aliases =  
> client.admin().cluster().state(new  
> ClusterStateRequest()).actionGet().getState().getMetaData().aliases();
> 
> ImmutableMap\<String, AliasMetaData\> pAlias = aliases.get(aliasName);
> 
> On Thu, Aug 22, 2013 at 10:58 AM, \<[didier....@gmail.com](mailto:didier....@gmail.com) \<javascript:\>\>wrote:
> 
> > awww!
> > 
> > so there is no way to test if an alias is related to an index? is it like  
> > testing the existence of an index at the end right? is there another way to  
> > do something like that?
> > 
> > Le jeudi 22 août 2013 10:40:08 UTC-7, Ivan Brusic a écrit :
> > 
> > > "I just want to retrieve the list of the existing indices related to my  
> > > alias (could be 0 index)"
> > > 
> > > Not it can't. Each alias must have an index. Sounds like you are  
> > > exploiting a bug which has been fixed.
> > > 
> > > --  
> > > Ivan
> > > 
> > > On Thu, Aug 22, 2013 at 10:26 AM, [didier....@gmail.com](mailto:didier....@gmail.com) wrote:
> > > 
> > > > I just want to retrieve the list of the existing indices related to my  
> > > > alias (could be 0 index). To do so, I am using the meta data of the cluster  
> > > > state.
> > > > 
> > > > if you are familiar with scala, here is what I am doing ( it was  
> > > > working on 0.19.12)  
> > > > val clusterState = client.admin().cluster().**prepareState().**  
> > > > setFilterIndices(aliasName).\*\*execute().actionGet().**getState()  
> > > > Option(clusterState.metaData()**.aliases().get(aliasName)).map {  
> > > > \_.keySet() }.toList.flatten
> > > > 
> > > > if it is not possible to do something like that anymore, how can I test  
> > > > if my alias is related to at least 1 index?
> > > > 
> > > > thanks for your help
> > > > 
> > > > Le jeudi 22 août 2013 10:16:21 UTC-7, Ivan Brusic a écrit :
> > > > 
> > > > > I missed that very important part of your original email. Perhaps I am  
> > > > > misunderstanding your usecase, but you want to have an alias on an index  
> > > > > that does not exist? Ailas information is stored in the index metadata and  
> > > > > aggregated from each index into the cluster state. No index = no alias.  
> > > > > An IndexMissingException sound appropriate.
> > > > > 
> > > > > Cheers,
> > > > > 
> > > > > Ivan
> > > > > 
> > > > > On Thu, Aug 22, 2013 at 10:04 AM, [didier....@gmail.com](mailto:didier....@gmail.com) wrote:
> > > > > 
> > > > > > Thanks Ivan,
> > > > > > 
> > > > > > I presume that you tried with a non-existing index?
> > > > > > 
> > > > > > is someone can try on 0.90.3? could be a great help!
> > > > > > 
> > > > > > thanks
> > > > > > 
> > > > > > Le jeudi 22 août 2013 10:00:18 UTC-7, Ivan Brusic a écrit :
> > > > > > 
> > > > > > > I run some similar code and it works fine on 0.90.2. If it truly is  
> > > > > > > a regression bug, one of these issues might have affected it:
> > > > > > > 
> > > > > > > [https://github.com/\*\*elasticsear\*\*\*\*ch/elasticsearch/\*\*issues?](https://github.com/ **elasticsear**** ch/elasticsearch/**issues?)\*\*  
> > > > > > > direct\*\*ion=desc&labels=\*\*v0.90.3&\*\*page=\*\*1&sort=updated& **state=**  
> > > > > > > closed[https://github.com/elasticsearch/elasticsearch/issues?direction=desc&labels=v0.90.3&page=1&sort=updated&state=closed](https://github.com/elasticsearch/elasticsearch/issues?direction=desc&labels=v0.90.3&page=1&sort=updated&state=closed)
> > > > > > > 
> > > > > > > Cheers,
> > > > > > > 
> > > > > > > Ivan
> > > > > > > 
> > > > > > > On Wed, Aug 21, 2013 at 1:56 PM, [didier....@gmail.com](mailto:didier....@gmail.com) wrote:
> > > > > > > 
> > > > > > > > Hi folks,
> > > > > > > > 
> > > > > > > > I am currently updating my app to use the latest version of ES  
> > > > > > > > (0.90.3), before I was using (0.19.12).
> > > > > > > > 
> > > > > > > > I had the following line to retrieve the state of the cluster with  
> > > > > > > > a filter on indices :
> > > > > > > > 
> > > > > > > > val clusterState = client.admin().cluster().prepa**reState().  
> > > > > > > > setFilterIndices(ali**asName).execute().actionGet().\*\*\*\*\*\*  
> > > > > > > > getState()
> > > > > > > > 
> > > > > > > > The aliasName could be an existing index or not. It was perfectly  
> > > > > > > > working on 0.19.12.
> > > > > > > > 
> > > > > > > > Now the actionGet() method throws an exception if the aliasName is  
> > > > > > > > not an existing index.
> > > > > > > > 
> > > > > > > > java.lang.reflect.InvocationTa**rgetException  
> > > > > > > > at sun.reflect.NativeMethodAccess**orImpl.invoke0(Native  
> > > > > > > > Method)  
> > > > > > > > at sun.reflect.NativeMethodAccess**orImpl.invoke(  
> > > > > > > > NativeMethodAcce**ssorImpl.java:39)  
> > > > > > > > at sun.reflect.DelegatingMethodAc**cessorImpl.invoke(  
> > > > > > > > DelegatingMe**thodAccessorImpl.java:25)  
> > > > > > > > at java.lang.reflect.Method.invok**e(Method.java:597)  
> > > > > > > > at org.codehaus.mojo.exec.ExecJav**aMojo$1.run(ExecJavaMojo.  
> > > > > > > > java:**297)  
> > > > > > > > at java.lang.Thread.run(Thread.ja**va:680)  
> > > > > > > > Caused by: org.elasticsearch.indices.Inde**xMissingException: [  
> > > > > > > > en\_us\_old] missing  
> > > > > > > > at org.elasticsearch.cluster.meta**data.MetaData.  
> > > > > > > > concreteIndices(**MetaData.java:529)  
> > > > > > > > at org.elasticsearch.cluster.meta**data.MetaData.  
> > > > > > > > concreteIndicesI**gnoreMissing(MetaData.java:509**)  
> > > > > > > > at org.elasticsearch.action.admin\*\*\*\*\*\*.cluster.state.  
> > > > > > > > TransportCluste**rStateAction.masterOperation(T**  
> > > > > > > > ransportClusterStateAction.jav**a:101)  
> > > > > > > > at org.elasticsearch.action.admin**.cluster.state.  
> > > > > > > > TransportCluste**rStateAction.masterOperation(T**  
> > > > > > > > ransportClusterStateAction.jav**a:42)  
> > > > > > > > at org.elasticsearch.action.suppo**rt.master.  
> > > > > > > > TransportMasterNodeO**perationAction$2.run(Transport**  
> > > > > > > > MasterNodeOperationAction.java\*\*\*\*\*\*:144)  
> > > > > > > > at org.elasticsearch.common.util.**concurrent.MoreExecutors$  
> > > > > > > > SameT **hreadExecutorService.exec** ute(MoreExecutors.java:293)  
> > > > > > > > at org.elasticsearch.action.suppo**rt.master.  
> > > > > > > > TransportMasterNodeO**perationAction.innerExecute(Tr**  
> > > > > > > > ansportMasterNodeOperationActi**on.java:140)  
> > > > > > > > at org.elasticsearch.action.suppo**rt.master.  
> > > > > > > > TransportMasterNodeO**perationAction.doExecute(Trans**  
> > > > > > > > portMasterNodeOperationAction.**java:94)  
> > > > > > > > at org.elasticsearch.action.suppo**rt.master.  
> > > > > > > > TransportMasterNodeO**perationAction.doExecute(Trans**  
> > > > > > > > portMasterNodeOperationAction.**java:42)  
> > > > > > > > at org.elasticsearch.action.suppo**rt.TransportAction.execute(  
> > > > > > > > Tra**nsportAction.java:61)  
> > > > > > > > at org.elasticsearch.action.suppo**rt.master.  
> > > > > > > > TransportMasterNodeO**perationAction.execute(Transpo**  
> > > > > > > > rtMasterNodeOperationAction.ja**va:89)  
> > > > > > > > at org.elasticsearch.action.suppo**rt.master.  
> > > > > > > > TransportMasterNodeO**perationAction$\*\*TransportHandler.  
> > > > > > > > messageReceiv**ed(TransportMas_**terNodeOperatio\*\*nAction.java:26  
> > > > > > > > 6)  
> > > > > > > > at org.elasticsearch.action.suppo**_rt.master.  
> > > > > > > > TransportMasterNodeO**perationAction$\*\*TransportHandler.  
> > > > > > > > messageReceiv**ed(TransportMas_**terNodeOperatio\*\*nAction.java:25  
> > > > > > > > 0)  
> > > > > > > > at org.elasticsearch.transport.ne**_tty.MessageChannelHandler.  
> > > > > > > > hand**leRequest(MessageChannelHandle**r.java:211)  
> > > > > > > > at org.elasticsearch.transport.ne**tty.MessageChannelHandler.  
> > > > > > > > mess**ageReceived(MessageChannelHand**ler.java:108)  
> > > > > > > > at org.elasticsearch.common.netty**.channel.  
> > > > > > > > SimpleChannelUpstream**Handler.handleUpstream(SimpleC**  
> > > > > > > > hannelUpstreamHandler.java:70)  
> > > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.  
> > > > > > > > DefaultChannelPipelin**e.sendUpstream(DefaultChannelP**  
> > > > > > > > ipeline.java:564)  
> > > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.  
> > > > > > > > DefaultChannelPipelin **e$DefaultChannelHandlerContext**.  
> > > > > > > > sendUpstream(DefaultChannelPi**peline.java:791)  
> > > > > > > > at org.elasticsearch.common.netty**.channel.Channels.  
> > > > > > > > fireMessageR**eceived(Channels.java:296)  
> > > > > > > > at org.elasticsearch.common.netty**.handler.codec.frame.  
> > > > > > > > FrameDeco **der.unfoldAndFireMessageReceiv** ed(FrameDecoder.  
> > > > > > > > java:462)  
> > > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.handler.codec.frame.  
> > > > > > > > FrameDeco**der.callDecode(FrameDecoder.ja**va:443)  
> > > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.handler.codec.frame.  
> > > > > > > > FrameDeco**der.messageReceived(FrameDecod**er.java:303)  
> > > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.  
> > > > > > > > SimpleChannelUpstream**Handler.handleUpstream(SimpleC**  
> > > > > > > > hannelUpstreamHandler.java:70)  
> > > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.  
> > > > > > > > DefaultChannelPipelin**e.sendUpstream(DefaultChannelP**  
> > > > > > > > ipeline.java:564)  
> > > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.  
> > > > > > > > DefaultChannelPipelin **e$DefaultChannelHandlerContext**.  
> > > > > > > > sendUpstream(DefaultChannelPi**peline.java:791)  
> > > > > > > > at org.elasticsearch.common.netty**.OpenChannelsHandler.  
> > > > > > > > handleUps**tream(OpenChannelsHandler.java**:74)  
> > > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.  
> > > > > > > > DefaultChannelPipelin**e.sendUpstream(DefaultChannelP**  
> > > > > > > > ipeline.java:564)  
> > > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.  
> > > > > > > > DefaultChannelPipelin**e.sendUpstream(DefaultChannelP**  
> > > > > > > > ipeline.java:559)  
> > > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.Channels.  
> > > > > > > > fireMessageR**eceived(Channels.java:268)  
> > > > > > > > at org.elasticsearch.common.netty**.channel.Channels.  
> > > > > > > > fireMessageR**eceived(Channels.java:255)  
> > > > > > > > at org.elasticsearch.common.netty**.channel.socket.nio.  
> > > > > > > > NioWorker.**read(NioWorker.java:88)  
> > > > > > > > at org.elasticsearch.common.netty**.channel.socket.nio.  
> > > > > > > > AbstractNi**oWorker.process(AbstractNioWor**ker.java:109)  
> > > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.socket.nio.  
> > > > > > > > AbstractNi**oSelector.run(AbstractNioSelec**tor.java:312)  
> > > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.channel.socket.nio.  
> > > > > > > > AbstractNi**oWorker.run(AbstractNioWorker.java:90)  
> > > > > > > > at org.elasticsearch.common.netty.channel.socket.nio.  
> > > > > > > > NioWorker.run(NioWorker.java:178)  
> > > > > > > > at org.elasticsearch.common.netty.util.  
> > > > > > > > ThreadRenamingRunnable.r**un(ThreadRenamingRunnable.java\*\*\*\*\*\*:  
> > > > > > > > 108)  
> > > > > > > > at org.elasticsearch.common.netty\*\*\*\*\*\*.util.internal.  
> > > > > > > > DeadLockProofWo**rker$1.run(DeadLockProofWorker**.java:42)  
> > > > > > > > at java.util.concurrent.ThreadPoo**lExecutor$Worker.runTask(  
> > > > > > > > Threa**dPoolExecutor.java:895)  
> > > > > > > > at java.util.concurrent.ThreadPoo**lExecutor$Worker.run(  
> > > > > > > > ThreadPoo**lExecutor.java:918)  
> > > > > > > > ... 1 more
> > > > > > > > 
> > > > > > > > Could you please help me on that issue?
> > > > > > > > 
> > > > > > > > thanks guys
> > > > > > > > 
> > > > > > > > --  
> > > > > > > > You received this message because you are subscribed to the Google  
> > > > > > > > Groups "elasticsearch" group.  
> > > > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > > > send an email to elasticsearc...@\*\*googlegroups. **c** om.
> > > > > > > > 
> > > > > > > > For more options, visit [https://groups.google.com/\*\*grou](https://groups.google.com/**grou)\*\*\*\*  
> > > > > > > > ps/opt\_out [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > > > 
> > > > > > > --  
> > > > > > > You received this message because you are subscribed to the Google  
> > > > > > > Groups "elasticsearch" group.  
> > > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > > send an email to elasticsearc...@\*\*googlegroups.\*\*com.  
> > > > > > > For more options, visit [https://groups.google.com/\*\*grou\*\*ps/opt\_out](https://groups.google.com/ **grou** ps/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > > > > .
> > > > > 
> > > > > --  
> > > > > You received this message because you are subscribed to the Google  
> > > > > Groups "elasticsearch" group.  
> > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > an email to elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).  
> > > > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > > .
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:20am UTC](https://discuss.elastic.co/t/retrieving-the-clusters-state-with-indices-filters/13288/10 "2017-07-06T02:20:06Z")

</div>


