Opened 6 years ago

Last modified 7 months ago

#13033 new New feature

MySQL full text search in admin

Reported by: simon29 Owned by: nobody
Component: contrib.admin Version: master
Severity: Normal Keywords:
Cc: JMGordon Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Full text search hasn't been implemented properly in admin. The query is being word split and OR'd like regular fields.

Attached patch fixes this, allowing you to type in any mysql boolean search.

Simply prefix your admin search_fields with @ to use, eg ('@myfield', ).

Be sure to include ALL the fields you have included in your index, else mysql might not use the full text index and instead default back to running a standard LIKE query.

BTW, I can't recall the various search_field operators mentioned in docs?

Attachments (1)

admin-fulltext-12288.diff (1.4 KB) - added by simon29 6 years ago.

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by simon29

comment:1 Changed 6 years ago by simon29

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

To clarify, this was already half implemented. This finishes the job. So isn't really a new feature, just a fix :-)

comment:2 Changed 6 years ago by russellm

  • Triage Stage changed from Unreviewed to Accepted

This isn't a bug fix -- there is nothing in the docs that says that search_fields allows full boolean searches. However, given that we're exposing MySQL Fulltext indexes, it makes sense that we should support them.

comment:3 Changed 5 years ago by lukeplant

  • Type set to New feature

comment:4 Changed 5 years ago by lukeplant

  • Severity set to Normal

comment:5 Changed 5 years ago by julien

  • Needs documentation set
  • Needs tests set

comment:6 Changed 5 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:7 Changed 5 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:8 Changed 3 years ago by aaugustin

Related: #15961

comment:9 Changed 13 months ago by JMGordon

  • Cc JMGordon added

comment:10 Changed 7 months ago by sasha0

  • Has patch unset
  • Needs documentation unset
  • Needs tests unset
Note: See TracTickets for help on using tickets.
Back to Top