I am probably just missing something obvious, but I am getting stale data
when searching right after the index update:
Settings settings = ImmutableSettings.settingsBuilder().put("client.transport.sniff", true).build(); TransportClient client = new TransportClient(settings).addTransportAddress(new InetSocketTransportAddress(host, port)); IndexResponse indexResponse = client.index(source).actionGet(); client.setQuery(matchAllQuery()).execute().get();
I thought index operation was synchronous? If I add a tiny delay between
the index and search operations, the updated data is being returned. I only
have a single node, no replication, with default settings. Can anyone point
me to the right direction here please?