Reword note telling people not to use autocomplete for ordinary search

Prompted by https://stackoverflow.com/q/76324437/1853523 - while we want to encourage people to use the most appropriate search method, telling them outright not to use autocomplete is a bit extreme. Remove the note in favour of some gentler advice.
pull/10501/head
Matt Westcott 2023-05-24 18:53:15 +01:00 zatwierdzone przez Matt Westcott
rodzic 9b0294c965
commit c8064466d4
1 zmienionych plików z 1 dodań i 5 usunięć

Wyświetl plik

@ -38,17 +38,13 @@ The Elasticsearch backend now defaults to matching on complete words. Previously
### Autocomplete searches
Wagtail provides a separate method which performs partial matching on specific autocomplete fields. This is useful for suggesting pages to the user in real-time as they type their query.
Wagtail provides a separate method which performs partial matching on specific autocomplete fields. This is primarily useful for suggesting pages to the user in real-time as they type their query - it is not recommended for ordinary searches, as the autocompletion will tend to add unwanted results beyond the specific term being searched for.
```python
>>> EventPage.objects.live().autocomplete("Eve")
[<EventPage: Event 1>, <EventPage: Event 2>]
```
```{note}
This method should only be used for real-time autocomplete and actual search requests should always use the `search()` method.
```
(wagtailsearch_images_documents_custom_models)=
### Searching Images, Documents and custom models