This feature allows you to include or exclude specific items from search results for particular terms. This way, you can guide your users' browsing based on your marketing and sales strategy.
You can create predefined lists of results that will be displayed when users type in specific terms. To do this, you will need to configure a custom result.
By default, Doofinder displays searched products according to their relevance (score). For the Custom Result to work correctly, this default value must not have been modified. For more information about the score, you can read the article about 'Custom Sorting'
How To Configure A Custom Result
Video last updated before 12-31-2024
To configure Custom Results, go to your Admin Panel > Search > Promotional Tools > Custom Results.
By clicking the Add Result button, you can create 'Custom Results' and specify various search terms for it.
Custom Results Fields

1. Name
Define a name to identify this custom result among others when you have created more than one.
2. Status
You can enable/disable the custom result without deleting it. It is advantageous to 'temporarily' disable the custom result whenever needed without removing it such that you can re-enable it later.
3. Duration
You can select the option to run this result continuously (status ongoing); or you can optionally set dates by which the custom results should take effect. Simply click on the option and select a date range.

4. Display Results
Choose whether you want to show only selected results, or if you prefer to show the selected results first and then the natural results.
5. Search Terms
To add a term, type it and click on "add term". You can repeat this operation to add more terms that will activate the Custom Results. Each time a user types one of these terms, the result will be the list of items defined for this Custom Result.
Terms can be set in two ways:
- Exact Match: This Custom Result will be displayed only if the user types the exact search term or terms chain.
- Broad Match: This Custom Result will be displayed if the text typed by the user CONTAINS the set search term.
Example of exact match search terms:

6. Included Items
Specify which items will contain the result set. Items and orders will be the ones shown in the right list. For building the list, you can use two tools:

- Individual Terms:
You can use your own Search Engine to find items from your index and add include them in the custom result. Type the product you are looking for, select it and click the Add items button.
- Rules:
You can use a filter criterion to find the relevant items you want to add to your list. Click on 'Add condition' to add more and then hit the 'Add rules' button.
7. Excluded Items
You can specify items that you want to remove from the results set. Use the same schema to add items or filters to the list of excluded results as used with the Included Items.
Say you want to customize the results when clients search for iPhone by removing phone covers; then, you would add a filter to exclude all unwanted items.

Please note that when accessing a previously configured Customer Result, some products might not appear as expected due to various reasons:
- The product is excluded because it is "out of stock."
- It has been excluded previously in the "Excluded Results."
- The product IDs have changed.
- The product is not indexed.
In any of these cases, Doofinder will label the product as "not indexed", indicating that it can't be displayed or found in the Customer Results.

Learn By Example
Let's say we create a Custom Result named 'Toys' including the search terms 'bricks, blocks, lego' as exact match and including the following products to be displayed first:
- Lego Bumblebee Helicopter
- Lego Batman Movie Clayface Splat Attack
- Lego Super Hereos Attack on Avengers Tower
and then display natural results. We also are excluding one item.

Hit the 'Save' button. This is how your screen will look like.

If you now search for the one of the terms indicated, let's use bricks, the included items will be displayed first in your search results:

Now you are ready to make your own marketing campaign and promote those items you want to sell the most.
The maximum number of custom results you can have is set at 100. To ensure that the Custom Results work correctly, we recommend setting the score in descending order as the first criteria. This is the default setting if you have not modified it before.
Apply A Custom Result In Recommended products query in Initial results
To choose the first products that you want to appear in your layer when it opens, you can configure the Query for recommended products.
- Query for recommended products: Search term to be used to select the recommended products. If empty, the most popular ones will be displayed (Desktop only).
The next step would be to create a Custom Result, in your Doofinder Admin panel. Within this custom result you can select the products you want to show in the first positions. Always remember to save your changes.
This is and example of a Custom Result named 'recommended'.

Once created, you can include the search term 'recommended' in Search > Layer Settings > enter the Layer you need to configure clicking on the Configuration button > scroll to Search Sequence and find the "Query for recommended products" space and type a query to use search results. Then, click "Save".
Make sure the "Initial Content" toggle is switched on for this field to appear.

When you need to, you can change the products in your custom result depending on what you want to be displayed first on your layer. You can also rename section titles, such as "Top Products" in the Translations area, to match your branding.

Apply A Custom Result In Recommended products query if no results
To choose the first products that you want to appear in your layer when a customer types and no results are found, you can configure the Query for recommended products.
- Query for recommended products: Search term to be used to select the recommended products (Desktop only).
The next step would be to create a Custom Result, in your Doofinder Admin panel. Within this custom result you can select the products you want to show in the first positions. Always remember to save your changes.
This is and example of a Custom Result named "no_results_desktop".

As you create this Custom Result, you can now apply it.

Once created, you can include the search term "no_results_desktop" in Search > Layer Settings > enter the Layer you need to configure clicking on the Configuration button > scroll to Search Sequence and find "Recommended products query if no results". Then, click "Save" to save the changes.

The Layer should now look like this:
