properly working template for the index

also replication between couchbase and elasticsearch properly working now