SearchWP 2.9 brings a completely revamped settings UI. The interface updates also afforded the ability to make optimizations in other areas as well. This article aims to outline what’s new!
The settings UI continues on the premise that there is a Default search engine used for native WordPress searches. Along with the Default engine any number of supplemental engines can be created. All engines share the same configuration options, the only difference being that supplemental engines have a label so you can differentiate them.
? The Panic Button
Updating to SearchWP 2.9 did NOT alter your settings or your index
Please note that simply updating to SearchWP 2.9 has not made any changes to your existing settings nor has it altered your index in any way. The biggest change you’ll see is that your Weights look relatively “low” — because they are. There’s a new default weighting scale, and the old default weights were lower across the board than the new weights. You’re welcome to update your weights if you’d like but you do not have to!
A hook as been implemented that allows you to revert back to the pre-2.9 settings UI. To use the legacy UI simply add this hook to your theme’s
functions.php and reload the page:
add_filter( 'searchwp_legacy_settings_ui', '__return_true' );
You can also add this hook to prevent the engine rules from being applied to the index, which was also added in 2.9:
add_filter( 'searchwp_indexer_apply_engines_rules', '__return_false' );
Note: By nature, the legacy UI will be missing some of the other improvements made to SearchWP 2.9
Enabling Post Types
There was some understandable confusion about the checkboxes over time, especially when it came to saving engines and subsequently making additional tweaks. When the settings screen reloaded, the top post type was given focus (as opposed to the post type you were working with prior to saving) which caused some headaches for customers.
Gone are checkboxes to enable/disable post types in favor of a new approach entirely: if a post type is listed within an engine configuration it will be included in results. If a post type is not listed within an engine configuration it will not be included in results.
Sliders for Weights
Another point of confusion over the past few years has been the numeric value for assigned Weights. To improve the experience of working with Weight adjustments, you can now simply interact with the available slider instead of having to enter in a numeric value. When sliding, a tooltip is shown to provide a bit more context:
By default the maximum weight is 100, so if you haven’t customized your weights since installing SearchWP your sliders may all sit at the low end of the scale. This is perfectly fine! The underlying implementation of the weighting system is still exactly the same, so you can continue using your settings as-is.
If you have customized your weights and have used a weight higher than 100, there is a new hook available to set the maximum weight for the sliders:
Post type rules
Each post type has a set of rules that allow you to refine both what is excluded from the index as well as what the index is limited to. Exclusions were always available in SearchWP but prior to version 2.9 the exclusions applied only to the search algorithm. This made management of engine settings more straightforward, but it also meant that the index could have content that did nothing but take up extra space.
As of SearchWP 2.9 post type rules directly apply to the indexing process in addition to the search algorithm. This means that if you’re making use of post type rules your search results might have a free optimization waiting should you decide to rebuild your index. As the indexer runs, it checks the rules you have in place for all engines and indexes only the bare minimum so as to keep the index itself as lean as possible.
That’s not all! Prior to SearchWP 2.9 you could only exclude content, but now you can also limit to content as well!
These rules now apply to both the indexing process and the search algorithm. As a result, SearchWP will let you know when your index should be rebuilt so as to inherit the optimizations put in place by your engine(s)
Rebuilding the index now takes place in real time without leaving the settings screen, so you can keep your eye on it if you’d like! ?
All of the other underlying concepts of SearchWP remain the same in version 2.9 but the updates to the settings interface will hopefully squash any confusion when it comes to getting things just right. While there’s a lot to see in the new UI I hope the low level behind-the-scenes updates are a welcome addition too!