SearchWP News

Category: Releases

Today is a good day, SearchWP 3.1 has been released! There are a number of features included in this release that have been (heavily) requested for some time, so I’m very happy to have them available as of today!

Quoted phrase searches!

A (somewhat unknown) feature of many search engines is the ability to wrap a search query in double quotes to restrict matches to results that have an exact match for that search query.

Take for example searching coffee mug vs. "coffee mug"

The latter would restrict results to only those that have coffee mug appearing exactly as such in the content. For a long time this was a limitation due to the way SearchWP operates (SearchWP is a token-based system, so context such as this is lost during the indexing process) but as of version 3.1 SearchWP now supports these quoted searches!

Please note, however, that quoted searches are not fully supported in SearchWP, there are some caveats! For more information please see the documentation for quoted searches. As a result of these caveats, this feature is opt-in and can be enabled on the Advanced tab of the SearchWP settings screen.

“Did you mean?”

Another feature that has been added to SearchWP 3.1 is the ability to automatically suggest a revised search if the original search did not produce any results. This comes in very handy when considering slight misspellings during searches.

When this option is enabled (which can be done on the Advanced tab of the SearchWP settings screen) SearchWP will keep an eye out for cases like this and automatically revise the search with a better match. The results from that better match will be displayed, along with a message on the screen indicating that a revised search has taken place. For more information please see the documentation for “Did you mean?” searches.

That’s not all!

As with all releases of SearchWP, version 3.1 also brings with it a number of bug fixes and lower level optimizations. Some of those enhancements include better handling of Synonyms, core support for additional keyword stemming locales, bug fixes with term highlighting, and quite a bit more!

Full changelog:

  • [Change] Partial term matching now requires PHP 5.4+
  • [Change] Synonym handling has been improved, for full explanation see
  • [New] Support (with caveats) for quoted/phrase/sentence searches, for more information see
  • [New] Automatic “Did you mean” handling for misspelled searches, for more information see
  • [New] Adds core support for keyword stemming for these language codes: EN, DA, NL, FR, DE, IT, NB, NN, PT, RO, RU, ES, SV (if you are using an Extension you can remove it)
  • [New] New filter searchwp_query_collate_override to override table COLLATE
  • [New] New filter searchwp_th_minimum_word_length to control highlighter minimum word length
  • [New] New filter searchwp_persist_extra_metadata to control whether Extra Metadata is persisted (e.g. to support quoted searches for that data)
  • [New] Detection for background indexer communication failure in some cases
  • [Improvement] Global excerpts now implement WordPress’ excerpt_more output where applicable
  • [Improvement] Partial match highlighting is more accurate
  • [Improvement] JavaScript bundlers have been reconfigured and optimized
  • [Fix] Account for AND logic refinement being too aggressive in some cases
  • [Fix] Trigger index when scheduled posts are published
  • [Fix] Delta updates when editing via Quick Edit
  • [Fix] Better checks against index when evaluating partial matches
  • [Fix] SWP_Query results are no longer incorrectly overridden with subsequent calls to SWP_Query->get_posts()
  • [Fix] Highlighter partial match setting now defaults to core partial match setting
  • [Fix] Warning when processing purge queue in some cases
  • [Fix] Parent weight transfer for Media is no longer enabled by default
  • [Fix] Global highlight functions are now initialized in a more accessible way
  • [Fix] z-index problem when adding a Post Type to an engine
  • [Fix] More consistent handling of internal metadata types
  • [Fix] Prevent inapplicable post types from being considered for search when in the WordPress Dashboard
  • [Fix] Take exclusive regex matches into consideration when tokenizing
  • [Update] Translation source

Version 3.0.7 of SearchWP has just been made available and is a recommended upgrade for all SearchWP customers. Version 3.0.7 is primarily a bug fix and improvement release, but here are the details from the changelog:

Full changelog:

  • [Improvement] Handling of highlighter logic
  • [Improvement] Highlighter excerpt generation
  • [Improvement] Debug environment checks/messaging
  • [Improvement] Provide feedback when synonyms are influenced by other tokenizer rules
  • [Improvement] Index statistics calculation
  • [Fix] Issue with multiple-word source terms for synonyms not being processed correctly in all cases
  • [New] New filter searchwp_weight_mods_wrap_core_weights to support additional weight customizations
  • [Update] Translation source
  • [Update] Updated updater

SearchWP version 3.0.6 has been made available to all active license holders. It is primarily a bugfix release with a couple of enhancements and is a recommended update for all license holders.

The biggest change in this version is an adjustment to how admin search interception is implemented. In order to take advantage of SearchWP’s index optimizations, you now need to specify which SearchWP engine is used when searching in the Admin/Dashboard.

There are additional optimizations and bugfixes that make SearchWP 3.0.6 more performant and display more relevant results in more cases.

  • [New] When enabling Admin search hijacking you must now choose an engine to use for Admin searches
  • [Change] Regex pattern matches are processed by min word length and stopword removal rules
  • [New] New filter searchwp_apply_rules_to_whitelisted_terms controls whether rules (min word length, stopword removal) applies to whitelisted terms
  • [Fix] Issue with partial matching when multiple searches are run for a single request
  • [Fix] Prevent parent attribution when searching in the Admin (would result in false negatives)
  • [Improvement] Partial match processing
  • [Improvement] Handling of delta updates to reduce resource usage
  • [Improvement] System Information is now more comprehensive
  • [Update] Translation source

Version 3.0.5 of SearchWP has been released and is a suggested update for all active license holders. There are a couple of enhancements and changes that should be discussed:

You can now paste in a comma separated list of Stopwords into the Stopword input and SearchWP will automatically create separate Stopwords for you. This will help when you’d like to import a list of Stopwords directly into the interface.

Partial matching has been changed slightly in version 3.0.5. In version 3.0 partial matching was implemented in such a way that it only applied when exact matches were not found. This went against the implementation of LIKE Terms and Fuzzy Matches (the Extensions that SearchWP absorbed in version 3.0) so this behavior has been reversed. When partial matching is enabled SearchWP will now search for partial matches regardless if there are exact matches. You can utilize the searchwp_partial_matches_lenient filter to restore the behavior from version 3.0 if you’d like.

The third party libraries used by SearchWP have been reorganized and updates. There are two reasons for this: primarily there was a security notice related to TCPDF which is a library used by SearchWP for PDF parsing/indexing. This security issue was not exploitable given SearchWP’s implementation as it relied on a malicious actor uploading a specific file type which needed to then be used in the creation of a PDF using TCPDF. SearchWP does not generate PDFs nor does it facilitate file uploads. While this exploit does not directly relate to SearchWP it is important to remain updated. The second reason for reorganizing these dependencies is an effort to circumvent an issue with plugin updates in certain Windows server environments.

The full changelog for version 3.0.5 is as follows:

  • [New] Pasting of comma separated Stopwords will create individual Stopwords from the list
  • [Fix] Conditional disabling of partial matches per engine by using provided filter
  • [Fix] Prevent missing exact matches when finding partial matches
  • [Improvement] Post types that are excluded from search during registration are now listed out
  • [Improvement] When Metrics is installed the engine configuration Search Statistics link is correct
  • [Change] Enabling partial matches no longer gives exact matches full priority, short circuiting on exact matches is now opt in via filter
  • [Change] Third party dependencies have been reorganized to reduce file path which should help to avoid issues on certain Windows servers
  • [Update] Translation source
  • [Update] PHP version compatibility
  • [Update] Dependency update which brings additional PHP compatibility
  • [Security] TCPDF security update (which as evaluated could NOT have been exploited)

SearchWP 3.0.4 is a bug fix and small improvement release that is a suggested update for all active license holders. Full changelog:

  • [Improvement] Handling of multiple word highlighting
  • [Improvement] Better restriction during indexing
  • [Fix] Issue with Advanced Custom Fields repeater detection
  • [Fix] Better handling of cached data
  • [Fix] Prevent unwanted indexer activity when using searchwp_indexed_post_types
  • [Change] Removal of ACF field references is now opt-in
  • [Change] searchwp_lenient_accents now applies during searches as well
  • [New] Filter searchwp_lenient_accents_on_search to allow refined control over leinient accent treatment

Version 3.0.3 Now Available

February 21, 2019 in

Version 3.0.2 of SearchWP has been made available to all active license holders. This release fixes a couple of bugs/regressions introduced in version 3.0. Full changelog:

  • [Fix] Fixes an issue with checking for unused meta keys when configuring search engines
  • [Fix] Fixes a potential issue with searchwp_short_circuit being incorrectly overridden
  • [Fix] Fixes an issue with synonyms not working as expected

Version 3.0.1 of SearchWP is now available which includes a small fix as outlined in the changelog:

  • [Fix] Fixes an issue that may prevent Custom Fields from appearing in engine configuration

SearchWP 3.0 is here!

February 19, 2019 in

SearchWP version 3.0 has been made available to all active license holders. There are a few big changes in this release that you should be aware of:

  • Rebuilt the Advanced settings screen
  • Stopword management
  • Integrated a number of extensions
  • Rebuilt the Stats screen
  • First party Advanced Custom Field support
  • Support for Gutenberg blocks (introduced in WordPress 5.0)
  • Improvements to SWP_Query
  • Bug fixes

Here’s a quick (3 minute video) going over a few of the UI updates, followed by a more detailed breakdown of what’s new/changed in version 3.0!

Advanced Settings Screen

The Advanced tab of the SearchWP settings screen has been rebuilt and modernized in many ways, take a look!

Screenshot of SearchWP's Advanced settings screen

The entire interface was re-thought from the ground up based on common use cases. The goal was to modernize the interface based on lessons learned from rebuilding the engine configuration interface in version 2.9.

Stopword Management

One of the biggest changes made to the Advanced settings screen is the inclusion of Stopword management. Stopwords are an important part of any search engine setup, and SearchWP 3.0 makes it much easier for you to manage your Stopwords. Prior to version 3.0 the only way to customize this list was through a hook, but now:

  • Localized defaults are used upon installation of SearchWP
  • Stopword suggestions are made based on the content of your site
  • Actions to sort/remove/restore Stopwords

Beyond implementing a localized list of default stopwords, SearchWP 3.0 will suggest additional stopwords based on the content of your site.

Screenshot of suggested stopwords in SearchWP

This will help to further optimize your index resulting in faster searches with more relevant results!

Find out more

Integrated Extensions

SearchWP’s Extensions have been a big contributor to its adoption. Certain Extensions were built as future features by design, and the time has come to directly integrate some of the most popular Extensions directly into SearchWP itself. The following Extensions have been deprecated in favor of their core counterparts:

  • Term Synonyms
  • Term Highlight
  • Manage Ignored
  • LIKE Terms
  • Fuzzy Matches

Term Synonyms have been directly integrated into the Advanced settings screen, and the UI has been improved in a number of ways as well:

Screenshot of synonym management in SearchWP

Synonym management in SearchWP

Term Highlight has been integrated as a Setting that can be enabled with a single tick of a checkbox, managing ignored terms has been moved directly into the Stats screen (more on that in a bit), and partial matches has been improved in a number of ways as well.

Prior to SearchWP 3.0 there were two Extensions to help with partial matches; LIKE Terms and Fuzzy Matches. They both did different things, but at first glance it was very confusing as to why you’d use one over the other, or both for that matter. Partial matches have been directly integrated into SearchWP 3.0, and the details of the implementation have been made available in the documentation for that feature.

Rebuilt Stats Screen

Search statistics have always been an important part of the data provided by SearchWP to site owners. Being able to monitor what your visitors are actively searching for can be a big help in determining what content changes to make on your site. The existing stats screen hadn’t changed much since version 1.0 and with the need to integrate management of ignored terms and the ability to reset the statistics it was time to rebuild and modernize it.

Screenshot of search statistics in SearchWP 3.0

The charting library has been updated and UI rebuilt in a more modern way which will make stats review a much more pleasant experience going forward. If you’re looking to get more out of your search stats, be sure to check out the Metrics extension!

Advanced Custom Fields Support

SearchWP has always considered custom fields to be first party content, and many SearchWP users are big fans of Advanced Custom Fields. The documentation for SearchWP mentions ACF a lot, and as of SearchWP 3.0 the Custom Fields dropdown will now automatically support “repeatable” fields by utilizing SearchWP’s ability to partially match meta keys:

Screenshot of ACF repeatables in SearchWP

Adding a repeatable entry will include all sub-fields of that repeatable ACF field, saving you the trouble of adding individual sub-fields. This functionality has been supported by SearchWP but prior to 3.0 you needed to use your own hooks to explicitly add support for partial meta key matches.

SearchWP 3.0 will also remove ACF reference fields (the fields with the same meta key but prefixed with an underscore) to clean things up for you.

Gutenberg Block Parsing

By default SearchWP 3.0 will parse content that has been input using blocks (a.k.a. Gutenberg) as introduced in WordPress 5.0. For the time being there is no way to give individual blocks specific weights, all of the content generated from parsing the block will be index as it was entered into the main post content.

If you would prefer that SearchWP not parse your blocks, you can add this hook to a custom plugin or your theme’s functions.php:

add_filter( 'searchwp_do_blocks', '__return_false' );
view raw functions.php hosted with ❤ by GitHub

If you feel that giving control over individual blocks would be useful in an upcoming version of SearchWP please send over your input!

Improvements to SWP_Query

The goal of SWP_Query was to mimic WP_Query so as to save you trouble when migrating from a traditional WordPress Loop for search results.

As of SearchWP version 3.0, SWP_Query now supports a more traditional Loop like so:

$swp_query = new SWP_Query( array( 's' => 'coffee' ) );
if ( $swp_query->have_posts() ) {
while ( $swp_query->have_posts() ) {
get_template_part( 'content', 'search' );
} else {
echo '<p>No results found!</p>';
view raw functions.php hosted with ❤ by GitHub

These new methods should make it easier for everyone to take advantage of what SWP_Query has to offer!

Bug Fixes and Improvements

There were a number of bug fixes and performance optimizations rolled into SearchWP 3.0 as well, here’s the full changelog:

  • [New] Advanced Settings screen rebuilt and optimized
  • [New] searchwp_legacy_advanced_settings filter controls whether the legacy Advanced Settings screen is used
  • [New] Integrated stopword management on the Advanced Settings screen
  • [New] Default stopwords for the following locales: CS, DA, DE, EN, ES, FI, GA, IT, NL, PL, PT, RO, RU, SV, TR
  • [New] Suggested stopwords based on existing site content
  • [New] Integrated Term Synonyms and improved management UI (extension is now deprecated)
  • [New] Integrated Term Highlight (extension is now deprecated)
  • [New] Integrated LIKE Terms and Fuzzy Matches (extensions are now deprecated)
  • [New] Adds setting to parse Shortcodes during indexing (e.g. UI for searchwp_do_shortcodes)
  • [New] SWP_Query now has the following methods: have_posts, rewind_posts, the_post, next_post allowing for a more traditional Loop
  • [New] Custom Fields dropdown now supports meta groups
  • [New] Automatic UI for “repeatable” field groups in Advanced Custom Fields
  • [New] Statistics screen rebuilt and optimized
  • [New] Management of ignored searches is now built in to the Stats screen
  • [New] Resetting of statistics is now built in to the Stats screen
  • [New] searchwp_statistics_popular_days_{$days} filter allows overriding of popular search queries
  • [New] searchwp_legacy_stats filter controls whether the legacy Advanced Settings screen is used
  • [New] searchwp_results_found_posts filter allows modification of SearchWP’s found posts
  • [New] searchwp_results_max_num_pages filter allows modification of SearchWP’s maximum number of pages
  • [New] Support for programmatic license management. See SearchWP_License class
  • [New] Adds (dismiss-able) notice during admin searches when admin searches are not hijacked by SearchWP
  • [New] Adds support for WordPress’ block editor during indexing (blocks will be parsed prior to indexing)
  • [Fix] Adds support for results limiting when parent attribution is enabled
  • [Fix] Better handling of emoji during indexing
  • [Fix] Prevent pattern whitelist matches from being counted twice
  • [Fix] Prevent data mutation when creating multiple supplemental engines at once
  • [Change] Indexing emoji is now opt-in using the searchwp_index_emoji filter

Version 2.9.17 of SearchWP includes a fix for delta updates that in some cases caused extensive resource usage, it is a recommended update for all active license holders.

Full changelog:

  • [Improvement] Better handling of post status and comment triggers of delta updates, reducing significant overhead in some cases

Version 2.9.16 Now Available

September 21, 2018 in

Version 2.9.16 of SearchWP is now available for all active license holders. In this release SWP_Query received a few updates and a number of fixes have been put in place.

Full changelog:

  • [Fix] Fixes an issue that prevented proper respect of searchwp_background_deltas
  • [Fix] Fixes an issue with debug log permissions in some cases
  • [Fix] Fixes an issue where Custom Field keys were not accurately retrieved in older versions of WordPress
  • [Fix] Fixes settings screen JavaScript error in IE11
  • [Fix] Fixes an issue preventing the application of searchwp_search_query_order
  • [Improvement] Notes the requirement that the index must be rebuilt after ticking checkbox to remove minimum character count
  • [New] Adds post_status parameter to SWP_Query
  • [New] Adds order parameter to SWP_Query
  • [New] Adds limited orderby parameter to SWP_Query
Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP