Automattic / Automattic/jetpack
Search: add better support for sites with multiple languages
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
We index posts based on both the language set for the blog, and also the language detected for the post. Currently though the search will only search based on the blog's language setting. We should add a way to support/control cross language searching.
Two cases to handle on the search side:
- Search across languages where for instance we search both the English and Korean fields. This will let us match on partial words within Korean which we cannot do when searching the same content in English fields
- Filter the search to only search within one language on particular parts of the site
There are also two popular multilanguage plugins we should add support for: WPML and Polylang. The indexing side of these falls under #8663, but on the search side we should also hook into how they handle search.
Contributor guide
Research direction
Start by tracing the search-side handling described in this issue and compare it with the indexing work in #8663. Review how WPML and Polylang handle search, then define behavior for cross-language searches and language-filtered searches; done means both cases and plugin integrations are supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100