The biggest limitation of standard WordPress search is that you can't search by combinations of keyword and categories or tags at the same time. Jsearch to the rescue!
How to Use Jsearch
Don't worry. This is a VERY short tutorial 🙂
When you're on a page showing search results, you'll also see a control like this:
There are three major areas and each is used to do different things, but first a few tips:
- The question mark buttons are used to show help to Jsearch users. The one at the top opens a mini-tutorial for Jsearch when clicked. The other three show very short descriptions of each section and what it does when the mouse hovers over the button.
- The three major sections can be opened or closed by clicking anywhere on the title bar (stretching from the title on the left to the buttons on the far right).
- Whether the three sections are opened or closed when you first load the page is set by the site administrator, but when you click to update the search, the sections you opened or closed will remain so.
Lastly, the Search Item Chooser and Search Items List sections both use a very minimalized control to modify search behavior. It's used as follows:
|Click this to remove a search item from the search.|
|Only search results that do NOT include any items marked with a minus will be shown.|
|For a result to show, at least one of the search items marked with a circle must be present. For example, if you search for "Mouse" and "Boat", any posting that includes EITHER Mouse or Boat will be listed.|
|ALL search items marked with a plus must be present for a result to show. While the circle option widens a search (because a result can be included due to one or another added search item), the plus option narrows a search by requiring that it meet stricter criteria.|
Search Item Chooser
The first is the section that is used to find and add search items (keywords, categories, and tags).
Adding categories or tags is a snap. Just scroll down until you see the one you want and add it to your search using the control buttons as described above (minus, circle, or plus).
The text search can be used simply by typing a word or two and clicking the control buttons just like for categories and tags. However, there are several advanced features related to the text box that you'll want to know about.
First, as you type, the category and tag sections are filtered. The reason for this is that you might want to add "dog" to your search only to find out that "dog" is already a category or tag.
The other advanced features can be ignored if you wish (just skip to the next section). If you want to add several words very quickly, you can do so all at the same time using the following tricks:
- To search for a specific phrase, put the phrase in quotes (ex. "taco grande").
- Any word (or quoted phrase) with a plus sign in front of it will be added using the plus behavior (ex. +this +and +this).
- Any word (or quoted phrase) with a minus sign in front of it will be added using the minus behavior (ex. -notthis).
- Any word without a plus or minus sign will automatically be added to the circle behavior.
When done, hit either the ENTER key on the keyboard to add all the words you entered.
The Search Items List
This area shows all the search items that have been added to the current search (note that the any changes made will not be shown until the "Update Search Results" button is clicked.
Here you can see that I want post results that contain either the words BOAT or SHIP and also must contain the phrase "COAST GUARD".
I've also added two categories. I want UNITED STATES, but not ARIZONA (I'm really not very interested in the Arizona coast guard.
Lastly, a series of tags. All results must now be tagged with WHITE (perhaps the boat color), and DAYTIME (don't want information about nighttime operations), and NOT be about FOREIGN ships.
As I hope you can see, you can very quickly and easily search for a wide variety of items getting as specific as you want to narrow down to exactly what you want (if it exists on the site).
When you're done configuring all the details of your search, click the "Update Search Results". The page will reload with any matches. If none are found, you might see this:
When no results are found, Jsearch doesn't wimp out and say "no results" like SOME programs… No! Instead it will explain in plain English how the search was interpreted so you might be able to understand what went wrong.
If nothing showed, but everything looks right, try removing one or two search items just in case or switch some from ALL to ANY behavior. If none of that works, what you're looking for probably just doesn't exist on the WordPress site you searched.
The Newest Version
|About Jsearch Version 2 - Leaner interface, custom-built query that handles all the hard searches that WP doesn't.|
|Jsearch Tutorial - For site visitors and users of Jsearch to learn (very quickly) how to USE the Jsearch interface.|
|Jsearch Setup - Download and learn how to install and customize Jsearch here. For site administrators who want to use Jsearch on their site.|
Older Versions (for historical purposes)
|Version 1 - Jquery enabled and functional, but awkward to use in some ways.|