Fix db variables.
Add support for elasticsearch