Wait the mixed index backend


toom@...
 

Hello,
 
The vertex that has just been created are not immediately available on mixed index (documented here [1]). 
I'm looking for a way to make sure the vertex is indexed, by waiting the mixed index backend. I think the easiest way is to request the vertex id using direct index query:
  graph.indexQuery("myIndex", "v.id:" + vertex.id())

But I didn't find a way to do that. Do you think this feature can be added? Maybe I can make a PR.
 
Regards,
 
Toom.
 
[1] https://github.com/JanusGraph/janusgraph/blob/v0.5.3/docs/index-backend/direct-index-query.md#mixed-index-availability-delay


Boxuan Li
 

Hi Toom,

Do you want to ALWAYS make sure the vertex is indexed? If so and if you happen to use Elasticsearch, you can set 
index.[X].elasticsearch.bulk-refresh=wait_for
See https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-refresh.html.

Best,
Boxuan


toom@...
 

Thank you, this is exactly what I look for.