Automattic / Automattic/jetpack

Search: add better support for sites with multiple languages

Open
#8,766 21 comments 2 reactions 0 assignees View on GitHub
[Feature] Search [Focus] i18n [Status] Search Index Change Customer Report [LEGACY] Enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.