Currently, this is not possible. With this small patch it seems to work fine (more extensive tests are needed).
In hook_field_settings(database columns) you need to add "index => TRUE" for each column that you want to have an index for.
| Comment | File | Size | Author |
|---|---|---|---|
| indices.patch | 3.14 KB | killes@www.drop.org |
Comments
Comment #1
yched commentedThe main concern with this approach is that it creates indexes for all fields of a given type, which leads to index bloat, whereas the actual need for indexes is usage-driven (Views, custom queries...)
See #231453: Allow indexing columns for the existing thread about indexes and my current proposal for this.