Jetpack Search is a powerful replacement for the search capability built into WordPress. For general features and FAQs, please see our information page. If you are looking for information about Jetpack Search plugin, check our support page.
Billing
How can I reduce the number of records on my site?
If you have particular post types on your site that you never want to count as a record and you don’t need other Jetpack features to work on that post type, then you can completely exclude it from being synced. This code can be added to a functionality plugin – more on how to do this here.
add_action( 'plugins_loaded', 'filter_blacklisted_post_types' );
public function filter_blacklisted_post_types() {
if ( class_exists( '\Automattic\Jetpack\Sync\Settings' ) ) {
// Get current blacklist
$blacklist = \Automattic\Jetpack\Sync\Settings::get_setting('post_types_blacklist');
//Check if post type is in blacklist
if ( ! in_array( 'topic', $blacklist ) ) {
// Append post_type to blacklist
$blacklist[] = 'XXXXX'
$settings = [
'post_types_blacklist' => $blacklist
];
// Update settings
\Automattic\Jetpack\Sync\Settings::update_settings( $settings );
}
}
}
It is not possible to exclude individual content from being indexed other than making it publicly inaccessible.
Will the search stop working if I exceed my maximum number of records?
A few weeks before your next billing cycle, you will get an email informing you that you are over your limit and telling you what you will be charged when you auto-renew. This gives you time to reduce the number of records or let the auto-renewal take place.
- If you are on an annual plan, your price will increase at most once a year.
- For monthly plans, we will check your record count every month before your plan is renewed.
I have the Jetpack Professional Plan. How is this different?
The main difference between the Jetpack Professional and the newer Jetpack Search plans is that you will not have access to the Instant Search overlay feature. The underlying improvements to speed and relevancy will be available to you, though. So you’ll get the improved search engine without the fancy new overlay interface.
If you are using Jetpack Search via the Jetpack Professional plan, we recommend the following:
- Enable Search from within wp-admin. The setting is under Jetpack → Settings → Performance. You can also enable this from your WordPress.com dashboard here.
- Replace the standard Search widget with the Jetpack Search widget. This is optional, but without it, you will not have access to the additional sort options or filtering.
- If you don’t see any results on your site, the index may not be ready yet. You can force the index to update by manually synchronizing your site with WordPress.com, which can be done from here.
Why did you change the pricing model?
There were two reasons why we changed our pricing model:
- Many folks were only looking for Search and did not want to also be paying for features they didn’t need.
- Allowing an unlimited number of records felt unfair because it was preventing us from offering lower prices or making improvements. Our costs for a site with one million posts are 1,000 times as much as a site with one thousand posts, but both sites were paying the same amount.
The new pricing makes Jetpack Search more affordable for small sites and still costs big sites less than the competition. It’s also available as a single product, so there’s no need to pay for other features you may not need just to use Jetpack Search.
Troubleshooting
The search box in my theme is not opening the overlay
Some themes do not use the standard get_search_form() function to render their search box. First, verify that the Search is working correctly on your site by adding a search query to the end of your site URL. For instance, if your site is mysite.com
, then navigate to mysite.com?s=searchterm
.
If that works, then there are a few options:
- Contact your theme’s author and ask them to add support for Jetpack Search. We try to attach to search boxes in many different ways.
- Add a search box to your theme yourself.
- Add a button to your site that will open the search overlay.
Some of my content is missing from search results.
When Jetpack is first connected it can sometimes take hours or days to fully sync all data depending on how many records you have. If the number of results when you have not done a search is still going up every few minutes, then it is likely that data is still being synchronized. When you first purchase Search, we also need to build your search index, which can take a while, though it is much faster than doing a full sync. Jetpack Search limits the number of characters to 30,000 when indexing.
There are some common problems that sites do have, though:
- Custom post types can be publicly available but be set to not be searchable. This happens when
exclude_from_search
it is set to true when registering the post type. - Content is directly imported into the database. If you are regularly importing content and not triggering the WordPress hooks, then Jetpack will not synchronize the data. A good hook to use is publish_post.
- Using
post_status
other thanpublish
. We only index and search against posts that have thepost_status
of eitherpublish
orclosed
(for bbpress).
If you change any of the above, you will need to fully sync your site. To do so:
- Log in to WordPress.com.
- Under “My Sites” navigate to Manage → Settings → General → Site Tools → Manage your connection.
- Under “Data synchronization,” click on “initiate a sync manually.”
In addition to the above, Jetpack skips indexing the following post types by default:
- revision
- scheduled-action
- nbcs_video_lookup
- reply (as used by bbPress)
- product_variation (as used by WooCommerce)
- nav_menu_item (doesn’t make sense to index this)
My custom taxonomy is never being displayed.
If you have configured a custom taxonomy in your sidebar widget, but it is never being shown, it is possible that your taxonomy is not yet supported. We have a fixed list of custom taxonomies that we index (a bit more than 1,000).
We can add to the list, but would prefer to do so only for generic words and names. If you would like to suggest a term to add, you can open an issue on our GitHub repository. Alternatively, you can add custom taxonomies via a filter.
Searches are not matching against content in post meta
We have a list of post meta keys that we match against. Adding meta to the allowlist doesn’t automatically include the data in the underlying search index. To ensure the performance and stability of our system, we limit what meta gets indexed. The current allowed fields can be seen here.
We understand that this list may not cover all users’ needs. If you have specific meta keys that you want included in the search index, feel free to let us know. If they are of a generic nature that other sites could use as well, we can consider upgrading our systems to include the new meta keys. However, if they are unique, the current available option is to map the custom meta to one of the allowed meta keys.
Below is a code snippet that can be used to duplicate the custom meta field to an allowed meta. It would require resaving the meta for existing content to get it synced with our systems as well.
add_action('save_post', array( $this, 'update_custom_meta'), 50 );
private function update_custom_meta( $post_id ) {
// Simple Mapping
if( $value = get_post_meta( $post_id, 'custom_field_to_be_indexed') ) {
update_post_meta( $post_id, 'jetpack-search-meta2', $value );
} else {
delete_post_meta( $post_id, 'jetpack-search-meta2' );
}
}
In the stats dashboard, search terms are not showing up
The Jetpack stats dashboard does not record the terms your readers use when using the search form on your site (or any other search forms on your site). They collect stats from search engines instead – more on that here.
How do I search against multilingual content with the WPML or Polylang plugins?
We do not currently support multiple languages on the same site. We hope to add support soon, but in the meantime, you can check this status in this public-facing GitHub Issue.
How do I only show results from certain post types (e.g. products)
This code filter will filter all search queries so only results from products and pages are shown. This does not impact the number of indexed records (see below).
function jp_filter_query( $options ) {
$options['adminQueryFilter'] = array(
'bool' => array(
'should' => array(
array( 'term' => array( 'post_type' => product' ) ),
array( 'term' => array( 'post_type' => page ) ),
)
)
);
return $options;
}
add_filter( 'jetpack_instant_search_options', 'jp_filter_query' );
How do I remove all posts/pages with a certain category
This filter will remove all posts/pages with the “removeme” category from search results. See the developer documentation for other fields available.
function jp_filter_query( $options ) {
$options['adminQueryFilter'] = array(
'bool' => array(
'must_not' => array(
array( 'term' => array( 'category.slug' => 'removeme' ) ),
)
)
);
return $options;
}
add_filter( 'jetpack_instant_search_options', 'jp_filter_query' );
How do I remove particular posts/pages from Jetpack Search
This code filter will remove particular posts/pages from Jetpack Search results.
Replace 2266
and 1724
from your posts/pages ids.
add_filter( 'jetpack_instant_search_options', function($options) {
$options['adminQueryFilter'] = array(
'bool' => array(
'must_not' => array(
array( 'term' => array( 'post_id' => 2266) ),
array( 'term' => array( 'post_id' => 1724) ),
)
)
);
return $options;
} );
Alternatively, you can also apply the below code:
add_filter( 'jetpack_instant_search_options', function($options) {
$options['adminQueryFilter'] = array(
'bool' => array(
'must_not' => array(
array( 'terms' => array( 'post_id' => [2266, 1724]) ),
)
)
);
return $options;
} );
Still need help?
Please contact support directly. We’re happy to advise.