Ideally the `index` and `type` can be configurable.