Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#26990 closed New feature (wontfix)

Support MySQL FULLTEXT INDEX in the model DDL

Reported by: Ed Morley Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords: mysql, fulltext, index
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Whilst there is ticket #3254 filed for general full text search support, it's regarding multiple DB types and primarily about adding support for searching, rather than creating indexes. As such, I think it's easier to break this piece out to a new ticket.

In MySQL 5.6 support was added to InnoDB for full text indexes:
https://dev.mysql.com/doc/refman/5.6/en/innodb-fulltext-index.html

Currently we have to create these via a migration like:

migrations.RunSQL(
    sql='CREATE FULLTEXT INDEX `idx_description` on foo(`description`);',
    reverse_sql='ALTER TABLE foo DROP INDEX idx_description',
),

It would be ideal to be able to define them via the model DDL instead, so the full DB state can be recreated from the model.

Change History (2)

comment:1 by Tim Graham, 8 years ago

Resolution: wontfix
Status: newclosed

This seems better suited for a possible contrib.mysql package, however, I don't think it makes sense to add such an index if this is the only feature. We might reopen this at some later time if such a package developers in Django. Meanwhile, you could propose it in an external package such as django-mysql. It likely needs to wait until more formal support for indexes is release in Django 1.11.

Version 0, edited 8 years ago by Tim Graham (next)
Note: See TracTickets for help on using tickets.
Back to Top