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.