-
Notifications
You must be signed in to change notification settings - Fork 0
Bug: No substring search in backend #17
Comments
Contacts / Persons seem to work with substring search in the backend. Unlike Contacts, Documents and Images use the wagtail search for which we currently use the postgres_search backend. The search-function of that backend, however, doesn't seem to support substring searches, so this is an upstream issue. However, the backend is able to index for substring match and the autocomplete-function of the backend can search for partial matches. I could even make that available to Documents and Image (Index and Chooser) by just replacing .search() with .autocomplete(). So we might have dirty a workaround but I'm not yet decided how this hack could be integrated. |
@ballaschk: Experimental patch is applied on the life server. Please test. |
Thanks for the screenshot. With the above commit, I only fixed "Documents" and "Images" . "Contacts" already work from the page, where you edit the Contacts. So there is the chooser/picker for contacts left. I'll have a look into that. |
I've made a workaround for the "Contacts" chooser. Test, please. In my test "her" is not matched , I think postgres fulltext index has stopwords for common words like "the" "it" and possible "his" and "her". |
Worked flawlessly in the instances I needed it. Thanks a lot! |
When searching contacts, documents or images from the main editor, only fully matching words are accepted as search terms in the self-populating results screen. This is true for tags, file names, image descriptions, etc. ...
Example:
The text was updated successfully, but these errors were encountered: