SearchWP

LIKE Terms

Current version: 2.4.6 View Changelog

Download available with active license

⚠️ Note: This extension is DEPRECATED as of SearchWP version 3.0 and will be removed soon ⚠️

Unlike Fuzzy Matches, LIKE Terms does not perform primitive spell checking at all. This is useful if you’re looking to allow partial matching of terms, without exposing close spelling variants which can cause performance issues in the wrong circumstances.

For example, you should use LIKE Terms instead of Fuzzy Matches if you’re looking to incorporate SKU searching and want to allow for partial term matches without exposing thousands of similarly “spelled” SKUs that would be included with Fuzzy Matches.

Filters

There are a number of filters to help with your LIKE Terms implementation:

searchwp_like_min_length
Customize the minimum length of a word for LIKE matching to be applied. Default is 4, to customize:

<?php
// Apply LIKE matching for terms 2 or more characters in length.
function searchwp_like_min_length( $length ) {
return 2;
}
add_filter( 'searchwp_like_min_length', 'my_searchwp_like_min_length' );
view raw functions.php hosted with ❤ by GitHub

searchwp_like_stem
Customize whether SearchWP applies LIKE matching to the keyword stem regardless of engine setting. Default is false, to customize:

<?php
// Control whether SearchWP uses the keyword stem when finding LIKE terms.
function my_searchwp_like_stem( $stem, $terms, $engine ) {
// Return true/false (default is false)
}
add_filter( 'searchwp_like_stem', 'my_searchwp_like_stem', 10, 3 )
view raw functions.php hosted with ❤ by GitHub

searchwp_like_wildcard_before
Customize whether SearchWP implements a LIKE wildcard before search terms. Default is true, to disable:

<?php
// Prevent SearchWP LIKE Terms from using a LIKE wildcard before search terms
add_filter( 'searchwp_like_wildcard_before', '__return_false' );
view raw functions.php hosted with ❤ by GitHub

searchwp_like_wildcard_after
Customize whether SearchWP implements a LIKE wildcard after search terms. Default is true, to disable:

<?php
// Prevent SearchWP LIKE Terms from using a LIKE wildcard after search terms.
add_filter( 'searchwp_like_wildcard_after', '__return_false' );
view raw functions.php hosted with ❤ by GitHub

Changelog

2.4.6

  • [Fix] Fixes PHP Warning

2.4.5

  • [Fix] Better handling of minimum character count
  • [New] New filter searchwp_like_wildcard_before allows control over partial matching before terms (default is true)
  • [New] New filter searchwp_like_wildcard_after allows control over partial matching after terms (default is true)
  • [Update] Updated updater

2.4.4

  • [Fix] Fixed an issue that prevented exclusive regex matches from being properly restricted

2.4.3

  • [Fix] Fixed a regression introduced in 2.4.2

2.4.2

  • [Fix] Fixed an issue with multiple terms
  • [Update] Updated updater

2.4.1

  • [Fix] Better stemming support

2.4

  • [New] New filter searchwp_like_stem allows developers to restrict LIKE matches to the term(s) (as opposed to term(s) and stem(s))
  • [Improvement] Support for automatic updates based on your SearchWP license key

2.1

  • [Change] Also use keyword stems to find LIKE terms

2.0

  • [Change] No longer force-disable AND logic
  • [Change] Updated to the new filter structure

1.0

  • Initial release

Want to make your search awesome right now?

More than 30,000 sites have chosen SearchWP!

You can utilize all of the content that’s gone unrecognized by native WordPress keyword search instantly with SearchWP.

Get SearchWP for just $99

  • Committed Support
    If you need help, support is fast, friendly, and here for you
  • Streamlined Setup
    Installation and setup that’s optimized for speed
  • Great Documentation
    Helpful, clear, and usable documentation is a priority

See what SearchWP customers have to say

  • “We’ve been using SearchWP on our Knowledge Base for the past few months, and it has made a significant difference for our clients. It’s helped reduce the number of support tickets because people can find what they’re looking for, and we also love the metrics and seeing trends in searches. If you want people to find things on your site, it’s the best and I highly recommend SearchWP!”

  • “We have a fairly complex network of sites. SearchWP is able to give us all the features we need. Works with Multisite, allows for multiple indexes, works with FacetWP, provides us granular control of results. In addition–fantastic customer service!”

  • “Dropping this into our rather clunky site made the search work excellently. I like being able to adjust weights of different taxonomies, etc., and integrating with FacetWP. This is one of the better plugins we’ve paid for.”

[wpforms id="3080"]