Skip to content

Search/filter on 'autocomplete' field and not 'title' field #275

@goodzack

Description

@goodzack

I am currently using Wagtail 7.1.1 and PostgreSQL 16. I have users that are trying to upload files that specifically made only of stop words which are deleted for PostgreSQL fulltext search (e.g. how_are_you.wav). These stop words are left in the autocomplete field and are deleted in the title field in the wagtailsearch_indexentry table, so the field for autocomplete ends up like 'are':2 'how':1 'you':3 and title end up blank.

Now, when you go to the Media admin screen and try to find 'how_are_you.wav', there's no actual way to search for it. The same is true for any kind of chooser.

wagtaildocs now uses autocomplete to search/filter on, so no_you.docx has a blank title field but 'no':1 'you':2 in autocomplete. You can successfuly search for 'no' and find no_you.docx.

quick table to show:
wagtailsearch_indexentry:

autocomplete title
'are':2 'how':1 'you':3
'no':1 'you':2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions