Thank you very much!
That worked just fine. I managed to find a possible bug. The document had over 100 000 keywords, which is fairly long, and for some reason a loop was stuck on processing the keywords.
I changed it to a different one, and that immediately improved the loop performance from about 50 seconds to 0.02 seconds, so it is as expected now. The document should be now properly indexed.
I will make sure to include this fix in the upcoming release.