-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ElasticSearch/Jetpack to customize search #44
Conversation
so far this is fairly straightforward, but i'll know more once the access is setup on the jetpack/es side fyi @dd32, @tellyworth |
@iandunn What's the status of this PR/issue #28? Our initial launch deadline is Friday, since we're aiming to be stable by 5.8's release next Tuesday (20th). Will we have ElasticSearch support by then? |
Oh, I never saw that the website had a deadline tied to the Core release; it's unlikely this will be done by then. I'm AFK Thursday/Friday too. I'm guessing using regular WP search will be performant with the small number of patterns we have now, but the quality of the results will be poor because of post content being included instead of descriptions. It'd potentially be faster to create a meta field with index terms as a temporary measure, but I'd lean towards just focusing on getting this done soon. |
Okay, it sounds like that's acceptable for the initial launch, since the api.w.org only serves a subset of patterns. Moving #28 out of Initial Launch. |
5cbf611
to
15626e6
Compare
15626e6
to
81ede01
Compare
@tellyworth , @gibrown, @earnjam: This is mostly working, and ready for review if you have any thoughts. I think the last bits are boosting the title over the description, and including the I've got e2e tests on my sandbox that I can commit to |
f23323e boosts the primary locale in some cases, but not enough to make them always appear before the If not, maybe a |
See WordPress/pattern-directory#44 git-svn-id: https://meta.svn.wordpress.org/sites/trunk@11184 74240141-8908-4e6f-9713-ba540dce6ec7
merged e2e tests: https://meta.trac.wordpress.org/log?rev=11187&stop_rev=11184 |
@earnjam: most of the w.org mu-plugins are still closed-source, but here's a copy of the one that <?php
namespace WordPressdotorg\Pattern_Directory\MU_Plugin;
/*
* Most of the site functionality is in `wp-content/plugins/pattern-*`, but some things are more appropriate for
* an mu-plugin, or need to be done before plugins are loaded.
*
* We don't have a paid Jetpack plan, so the Search feature would normally be off. The Jetpack team has manually
* created custom indexes for Patterns, though, letting us use this feature for free.
*
* This has to be done before `plugins_loaded`.
* @link https://docs.wpvip.com/technical-references/elasticsearch/integrating-jetpack-search/.
*/
define( 'JETPACK_SEARCH_VIP_INDEX', true );
add_filter( 'pre_option_has_jetpack_search_product', '__return_true' );
add_filter( 'jetpack_active_modules', __NAMESPACE__ . '\enable_jetpack_search_module', 9999 );
function enable_jetpack_search_module( $modules ) {
if ( ! in_array( 'search', $modules, true ) ) {
$modules[] = 'search';
}
return $modules;
} |
fixes #28 , WIP
xref tellyworth/plugin-directory#1