How to index a specific number of Characters on Django Charfield?
For example, this is how we index fields in Django, but I guess it applies to entire field or all characters.
class Meta:
indexes = [
models.Index(fields=['last_name', 'first_name',]),
models.Index(fields=['-date_of_birth',]),
]
So, how to apply index to specific portion of field as shown in mysql below.
CREATE INDEX part_of_name ON customer (name(10));