-
Notifications
You must be signed in to change notification settings - Fork 62
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
Custom ACF field with boost #488
Comments
Hi @greenSkin 👋 Can you share the code snippets you've tried? Also, is this a site hosted on Pantheon? |
Yes, the site is hosted on Pantheon. I've tried a few different things. The simplest was the following: add_filter( 'solr_index_custom_fields', function( $indexed_keys ) {
$indexed_keys[] = 'solr_search_boost';
return $indexed_keys;
} );
add_filter( 'solr_boost_query', function( $solr_boost_query ) {
return 'post_title^2 post_content^1.2 solr_search_boost^5';
} ); The |
Oh! You might've been bit by #359 too. Solr Power doesn't search against the post meta value by default, so you need to do some code trickery to make that happen. When boosting, I think you'll need to use Can you try those out and let me know how you progress? |
Thanks. I applied #359 solution and it seems to help but I'm still not able to get the boost working. I set the boost to |
I'm trying to use a custom ACF field as a boost keyword field. I'm looking to raise posts to the top of search results based on matches in this field. I've tried using the
solr_index_custom_fields
andsolr_boost_query
filters but have had no luck. Please help!The text was updated successfully, but these errors were encountered: