> I am not sure why some commits take very long time. Hmm... Because it merges index segments... How large is your index?
> Also is there a way to reduce the time it takes? You can disable commit in DIH call and use autoCommit instead. It's kind of hack because you postpone commit operation and make it async. Another option is to set optimize=false in DIH call ( it's true by default ). Also you can try to increase mergeFactor parameter but it would affect search performance.