docs/releases/5.1.2.md
September 25, 2023
---
local:
depth: 1
---
ignore_conflicts when creating extra permissions for snippets, for SQL Server compatibility (Sage Abdullah)wagtailsearchpromotions_query table is correctly set after migrating data (Jake Howard)None from being exported as strings (Christer Jensen)imghdr with Willow's built-in MIME type detection (Jake Howard)AutocompleteField for full functionalityIn Wagtail 4.2, the search bar within snippet chooser interfaces (and custom choosers created via ChooserViewSet) returned results for partial word matches - for example, a search for "wagt" would return results containing "Wagtail" - if this was supported by the search backend in use, and at least one AutocompleteField was present in the model's search_fields definition. Otherwise, it would fall back to only matching on complete words. In Wagtail 5.0, this fallback behavior was removed, and consequently a model with no AutocompleteFields in place would return no results.
As of Wagtail 5.1.2, the fallback behavior has been restored. Nevertheless, it is strongly recommended that you add AutocompleteField to your models' search_fields definitions, to ensure that users can receive search results continuously as they type. For example:
from wagtail.search import index
# ... other imports
@register_snippet
class MySnippet(index.Indexed, models.Model):
search_fields = [
index.SearchField("name"),
index.AutocompleteField("name"),
]