Latency in indexing using client.update() of the high level rest client

We have started using the high level REST client finally, to ease the development of queries from backend engineering perspective. For indexing, we are using the client.update(request, RequestOptions.DEFAULT) so that new documents will be created and existing ones modified.

The issue that we are seeing is, the indexing is delayed, almost by 5 minutes. I see that they use async http calls internally. But that should not take so long, I looked for some timing options inside the library, didn't find anything. Am I missing anything or the official documentation is missing for this?

Use:

client.index(request, RequestOptions.DEFAULT);

Or better the bulk api (look at the bulk processor).
An example at:

https://github.com/dadoonet/legacy-search/blob/02-bulk/src/main/java/fr/pilato/demo/legacysearch/dao/ElasticsearchDao.java#L71

The issue that we are seeing is, the indexing is delayed, almost by 5 minutes.

How do you know that?

We see the updates happening, but after 5 minutes. Finally, after setting the refresh_interval to 1s, the updates are faster now. Do you think. client.index() would be faster?

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