WordPress / WordPress/pattern-directory
Search: Fix locale boosting
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 134
- Forks
- 46
- Avg merge
- 9h 4m
- Merged PRs (30d)
- 19
Description
#44 implemented ElasticSearch, but the sorting of locales doesn't match 9a03a8717a4e0f728e936f96dba96da43c537ba5. Instead, the locales are mixed.
e.g., if you look at the results for https://api.wordpress.org/patterns/1.0/?wp-version=5.8&pattern-keywords=11&locale=nl_NL&search=offset, the order is:
[
"en_US",
"en_US",
"nl_NL",
"nl_NL",
"en_US"
]
( the $.*.meta.wpop_locale JSONPath filter in Insomnia is convenient )
Maybe in a search context we still want the relevancy to override the locale in some cases, though?
If not, maybe a sort would be a better approach than boosting? The 0.00001 boost is how the plugin directory does it, though.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the Elasticsearch search behavior introduced by #44 with commit 9a03a8717a4e0f728e936f96dba96da43c537ba5. Use the patterns API request with locale=nl_NL and search=offset to inspect the locale ordering; done when the ordering matches the intended behavior and the choice between boosting and sorting is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, php
- Domain
- search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100