Wait for index population to complete?

Is there a way to wait for an index to be built after issuing a Create Index statement?

I have a situation where I do the following:

  1. Load Meeting Nodes from a CSV
  2. Create Index On Meeting_id field
  3. Load MeetingParticipants Relationship from another CSV (which should be using the Meeting_id index from step 2)

The problem is that the create index step doesn't complete until after the load relationships import starts. This effectively makes my import take hours.

@dannyseismic

Presumably you could query call db.indexes() of show indexes and not run step 3 until you see the status of the index is ONLNE

Hi @dannyseismic ,

Try with CALL db.awaitIndex("MyIndexName", 300) in between the second and third step.

Bennu