Hey everyone,
I indexed some of the documents through java api and they were in this
format:
{"pid":10001,"lang":"lang1","properties":[{"name":"prop1","type":"type1","values":["p1v1","p1v2"]}]}
Indexing works fine for me.
But when I tried to search I got this exception:
Exception in thread "main"
org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to
execute phase [dfs], total failure; shardFailures {[na][products][0]: No
active shards}{[na][products][1]: No active shards}{[na][products][2]:
No active shards}{[na][products][3]: No active
shards}{[na][products][4]: No active shards}
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:259)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.start(TransportSearchTypeAction.java:144)
at
org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction.doExecute(TransportSearchDfsQueryThenFetchAction.java:62)
at
org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction.doExecute(TransportSearchDfsQueryThenFetchAction.java:52)
at
org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)
at
org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:106)
at
org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:43)
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.search(AbstractClient.java:206)
at
org.elasticsearch.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:743)
at
org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:53)
at
org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:47)
at com.ankit.json.IndexJson.search(IndexJson.java:50)
at com.ankit.json.ToJson.main(ToJson.java:72)
Any help would be greatly appreciated..:!!!
Thanks in advance.