Adding multi-threading to index creator for a big speed-up.