The wagtail docs say that PostgreSQL search is a good alternative for relative smaller websites. The docs show how to set the search backend.
WAGTAILSEARCH_BACKENDS = {
'default': {
'BACKEND': 'wagtail.contrib.postgres_search.backend',
'SEARCH_CONFIG': 'english',
}
}
However the website I'm creating has more then one language. How do I configure the other languages in the WAGTAILSEARCH_BACKEND?
Would 'SEARCH_CONFIG': ['english', 'dutch'] be possible? Docs don't say anything about it.
I think I found howto. Would be nice if to see it confirmed. Wagtail has this from wagtail.search.backends import get_search_backend
If you look at the source code you can see that you can define a backend when calling this function
s = get_search_backend(backend=default)
So you can switch backend on the fly by first calling this function and switch to some other backend on basis of the language.
Wagtail is so cool!