org.elasticsearch.action.NoShardAvailableActionException: [lists][3] No
shard available for [[lists][INTERCHANGE][id:1]: routing [null]]
at
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.perform(TransportShardSingleOperationAction.java:140)
at
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.start(TransportShardSingleOperationAction.java:125)
at
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:72)
at
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:47)
at
org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)
at org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:83)
at
org.elasticsearch.client.support.AbstractClient.get(AbstractClient.java:171)
at
org.elasticsearch.action.get.GetRequestBuilder.doExecute(GetRequestBuilder.java:126)
at
org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:53)
at
org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:47)
at
dk.cooldev.elasticsearch.service.impl.ElasticSearchServiceImpl.findById(ElasticSearchServiceImpl.java:19)
I'm wondering why I am able to create and delete the index, but not use it
to find document? Is there some setting, I'm missing?
It may be a timing issue. You can use the admin client to check if the
index exists before starting the test phase. We ran ES embedded and had to
do that before indexing or searching for anything.
On Wed, Mar 7, 2012 at 10:32 PM, Christian von Wendt-Jensen < csj.the.man@gmail.com> wrote:
Hi,
I'm having a junit setup with a local node with data, and on
"@BeforeClass", I initialize the node like this:
@BeforeClass
public static void init()
{
node = nodeBuilder().local(true).data(true).node();
client = node.client();
service = new ElasticSearchServiceImpl();
service.setClient(client);
}
org.elasticsearch.action.NoShardAvailableActionException: [lists][3] No
shard available for [[lists][INTERCHANGE][id:1]: routing [null]]
at
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.perform(TransportShardSingleOperationAction.java:140)
at
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.start(TransportShardSingleOperationAction.java:125)
at
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:72)
at
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:47)
at
org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)
at org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:83)
at
org.elasticsearch.client.support.AbstractClient.get(AbstractClient.java:171)
at
org.elasticsearch.action.get.GetRequestBuilder.doExecute(GetRequestBuilder.java:126)
at
org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:53)
at
org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:47)
at
dk.cooldev.elasticsearch.service.impl.ElasticSearchServiceImpl.findById(ElasticSearchServiceImpl.java:19)
I'm wondering why I am able to create and delete the index, but not use it
to find document? Is there some setting, I'm missing?
I've found the solution by digging into other posts with similar issues. As
keteracel suggests, it is a timing issue. I thought that my index was ready
when I called:
(either Green or Yellow) to be sure the index is initialized
Cheers,
Frederic
On Thursday, 8 March 2012 06:05:45 UTC-3, Christian von Wendt-Jensen wrote:
Hi,
I've found the solution by digging into other posts with similar issues.
As keteracel suggests, it is a timing issue. I thought that my index was
ready when I called:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.