Getting IndexnotFound Exception java


(Vishnu Divakar) #1

I am indexing a document using prepareIndex java API. And it is returning positive status. When I immediately call prepareSearch API it would return IndexNotFound exception. Please help me with this issue.

I tried adding delay of 1 second in between prepareIndex and prepareSearch then it would sometime work and sometime may not work.

Please give me some suggestions.


(Alexander Reelsen) #2

This question is impossible to answer without a code sample. I suppose you are not waiting for the future of the create index API to return and so the search request sometimes finds an index and sometimes doesnt. But again, just a wild guess without any code.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.