add a hook for ES index creation using custom settings
add explicit tests for ESSetup and add an optimize method