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.
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!
- [Change] Partial term matching now requires PHP 5.4+
- [Change] Synonym handling has been improved, for full explanation see https://searchwp.com/?p=193232
- [New] Support (with caveats) for quoted/phrase/sentence searches, for more information see https://searchwp.com/?p=190759
- [New] Automatic “Did you mean” handling for misspelled searches, for more information see https://searchwp.com/?p=190545
- [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
- [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
- [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
SWP_Query results are no longer incorrectly overridden with subsequent calls to
- [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
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