deprecate createIndex that takes an Encoder