Coding style & architecture review.
 - use commons-cli to parse the command line.
 - remove "output" option, we need to store that in the index's settings
 - move common connection/db code to the Worker class
 - Java's exceptions are OK, do not catch them too early
 - use final attributes if you can