SearchWP Documentation

View the installation guide, browse the Knowledge Base, find out about SearchWP’s many hooks

Engine Configuration

The primary way to configure SearchWP is using the Engines tab of the SearchWP Algorithm screen:

Screenshot of SearchWP's Engine settings

Specify exactly what to consider when performing searches

Engine Settings

To edit the settings for an Engine, click the Source & Settings button for that engine. A dialog will be presented to you:

Screenshot of SearchWP's Engine Settings dialog

Easily control which Sources to consider during searches

Note: The Default Engine is special in that it is the Engine that will be used for native WordPress searches.

As a result, the only enabled Sources for the Default Engine are Post Types (e.g. Posts, Pages, Custom Post Types). A supplemental Engine can include any Source.

Using this dialog you can pick and choose which Sources will be included in search results for this Engine. Further you can:

  • Determine whether keyword stems should be considered
  • Designate the Engine as the one to use for searches in the WordPress Admin

Source Settings

Each SearchWP Engine has a collection of Sources. A Source is an “indexable” type of content on your site. An Engine will include results only from the Sources which have been added to it.

Each Source in turn has its own settings – Attributes and Rules.

Attributes
Types of content within each Source, e.g. Title, Content, Custom Field, Category, Tag, etc.
Rules
Control whether entries are returned or not based on your defined criteria.

Using Attributes and Rules you can customize your Engine to do exactly what you want!

Attributes

Each Source within a SearchWP Engine has its own unique set of Attributes. You can pick and choose which Attributes are considered during searches for each Source within each Engine by clicking the Add/Remove Attributes button for that Source.

For example, when considering Posts, the following Attributes are made available:

Screenshot of Source Attribute management

Pick and choose which Attributes to consider for each Source

Once you’ve decided which Attributes you’d like to consider, each can be given its own relevance weight by adjusting the slider. By default there are three slots on the slider. The further right the slider, the more weight that particular Attribute will be given in the search algorithm.

Screenshot highlighting weight adjustment

Assign relevance to individual Attributes

Note: Adjusting weights can be done at any time without needing to rebuild the index. Application of these values is applied as searches are run. There may be a time where customizing the Attributes for a Source necessitates that the Index be rebuilt. SearchWP will notify you when that happens.

Rules

As is the case with Attributes, Rules can be applied per Source per Engine, allowing you to define what should (or should not!) be returned as results. Some example restrictions include:

  • Exclude entries in a certain Category
  • Only show entries published within the past 6 months
  • Limit Media to a file type
  • etc.

Clicking the Edit Rules button allows you to define the circumstances under which entries should (or should not) be returned.

Screenshot of SearchWP Engine Source Rules management

Establish Rules for your Engines

There are some things to note when it comes to setting up your Rules:

  • Rules are grouped using conditions either by IN logic or NOT IN logic.
  • Within Rules each condition is evaluated alongside the next using OR logic, meaning any condition can be met.
  • When multiple Rules are added, the set of rules is evaluated using AND logic, meaning all Rules must be satisfied in order to take effect.

Given this setup, you will need to be mindful of the way you are setting up your Rules and conditions. If something seems impossible it may be worth trying a new combination of OR and AND logic.

Options

Transfer weight
When this option is enabled on a source, the entries from this source that match the current search, would not be included in the results. The designated entry to receive the transferred weight would be included instead. For example if a Post ID is specified, if any Post matches the search, the Post with the specified ID will be included in the results in its place.

Create a Better WordPress Search Experience Today

Never lose visitors to unhelpful search results again. SearchWP makes creating your own smart WordPress search fast and easy.

Get SearchWP Now
Multiple Search Engines Icon