Finally got mapping for elasticsearch working