Use configuration defined encoding
Add checking configuration for elasticsearch