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.

2 REPLIES 2

dana_canzano
Neo4j
Neo4j

@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

bennu_neo
Neo4j
Neo4j

Hi @dannyseismic ,

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

Bennu

Oh, y’all wanted a twist, ey?