Changes to Synonym handling in SearchWP 3.1

September 24, 2019

Prior to version 3.1 of SearchWP (and also in Term Synonyms when it was a standalone Extension) Synonyms were handled differently than they are in version 3.1 and later.

Previously, the implementation of Synonyms was a bit short sighted in that it assumed the source would be a single term. It turns out that there are many cases where the source should be multiple terms and handled accordingly.

SearchWP 3.1 has learned this.

Secondly, term replacement was too aggressive in the initial implementation, and replacements were made as each Synonym was processed. In some cases this resulted in a resulting search string that was far too limited and/or abstract to be useful any longer.

SearchWP 3.1 has learned from this.

Synonym processing in SearchWP 3.1 is much better for the end result. Multiple source terms now work as expected, and replacements are handled in such a way that aims to end up with the search string that will generate the best results for your visitors.

You can ‘revert’ to the previous implementation of Synonym handling with the following hook:

<?php
add_filter( 'searchwp_synonyms_aggressive', '__return_true' );
view raw functions.php hosted with ❤ by GitHub
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