An effective search engine is key to creating a great user experience and high conversion in any webshop. Raptor provides you with a simple, yet powerful search solution based on the open-source engine from Typesense.
In the Raptor Control Panel, you create a search index from your product feed and select parameters to show as facets on your website. On top of the search index, you can personalize search results using Raptor's renowned personalization strategies. Once set up, you implement the Typesense search UI on your website, providing you with full creative flexibility.
You can at any time edit a search index to fit the search experience you would like to deliver on your website.
This article will show how to configure and test a search index from your product feed.
Configure your search index
1. Log in to Raptor Control Panel
2. Go to Search Configurator in the menu
3. Click Configure search engine
4. Click Create Raptor Search. This will create a Typesense cluster hosted by Raptor utilizing Raptor's integration to Typesense. A search server URL and a search API key are generated. You will need these - along with a collection name that will be generated when creating a search index - when implementing the search UI on your website.
5. Now, you are ready to create a search index. Click Create new index in the top right corner. You will open the configuration screen:
6. Give the index a suitable name. The name is needed when you implement the search UI, and cannot contain special characters, spaces nor uppercase letters.
7. Select the product feed the index should be based upon (if no feeds are available, please reach out to Raptor)
Now, you need to select the parameters from your product feed, you would like to map to the index and thereby make searchable.
Product ID and Product Name are required and included in the index per default.
8. Include parameters from your feed by clicking + Add new mapping
9. Select parameter in the first dropdown and give it a suitable name in the text box.
10. Check if the data type is correct - if not, you can change it. The data type dictates which Typesense UI features can be used when displaying the parameter as a facet on your website, e.g. decimals (like price) can be showed as a slider or interval radio buttons for the user to narrow down a search.
11. Switch the Include in facet-button on, if you would like the parameter to appear as a filter on the search page - this will often be the case with parameters like Brand, Category, Stock status and Price. If attributes like color, size, reviews, certifications etc. are present in your product feed, these are great to include as facets.
12. Switch the Required-button to exclude products from being searchable that do not contain information in the parameter.
NOTE: Make sure to map the parameter ImageURL to fetch images for your search results. Images should not be included as a facet.
Apply re-ranking and personalization strategies
When setting up a search index, you can apply Raptor's re-ranking and personalization strategies to optimize search results on your site.
In the Ranking section, you can select a search strategy from the drop-down. For a strategy to be available it must be activated and configured in the Search Personalization tab.
When you are happy with your setup, click Create. This will create the index and save it as a draft.
Click Save & publish to finalize your index and make it available for implementation.
Test your search index
When you have configured and published your search index, you can test it.
1. In the Search index list, click Test on the search index you will like to test
2. You will now go to a test site with a main search field in the top and all the facets you included in your index to the left. The search field in the top will by default search in product names. Test that you find the expected products when searching.
By hovering the product previews, you can see the information that is delivered in the search output (including basic information like ID, name, brand, category and technical information like text match score)
3. By clicking the Settings-button in the upper right corner, you will open a new window. Here, you can configure the parameters the main search field searches in and which relative weights each parameter should have. This will create a text match score that Typesense will use to rank products by. In the screenshot below, the parameter "description" is added, but with half the weight of the product name. This means that search results matching the product name will have twice the weight (and therefore a higher text match score) as results matching the description (and thereby take priority). If the weights are of equal value, the order of the parameters will dictate the priority.
NOTE: The weights are only set for test purposes for you to find the desired settings and are not automatically transferred to Typesense. You can set the same weights in Typesense manually when implementing.
About text match score and ranking: The parameter weights available in the Settings (as described above) is a tool for indicating when a product should have a higher priority than another product by ranking on a text match score.
If a user performs a search for the term "lipstick", and the term is present in both the product name and the description in one product, it will get a higher text match score than a product, where lipstick is only present in the name. And a product where the term only appears in the description will get the lowest text match score.
Raptor ranking and personalization strategies will kick in, when multiple products have the same text match score (at tie-break). This way, users will see the most relevant products according to their search terms, but with either personal ranking, popularity ranking, conversion rate ranking, etc. (according to the strategy applied) as a layer on top.
The synonyms feature allows you to create two kinds of synonyms: one-way synonyms and multi-way synonyms
One-way synonyms: Defining the words iphone and android as one-way synonyms of smart phone will cause searches for smart phone to return results containing iphone or android or both.
With Multi-way synonyms you define search terms that should be considered equivalent to each other. If you define the terms jacket, coat and blazer as synonyms, searching for one of those terms will return all records containing one or more of the three terms.
This way you can create synonyms that are specific to your product catalog and improve the hit rate when your customers search on your website.
1. On an active search index, click the Synonyms button
2. To create a multi-way synonym, enter the terms that are equivalent to each other in the Synonyms field e.g., blazer, coat, jacket. Separate the terms by a comma. Leave the Root field empty.
2a. To create a one-way synonym, enter the root term that you wish to create synonyms for (e.g. shoe) in the root field. Now, enter synonyms in the Synonyms field e.g., sneaker, loafer, pump. Separate the terms by a comma.
Note: synonyms are - like search phrases in general - not case-sensitive, so you only have to create your synonyms once.
3. When you are happy with your entry, click Add synonym button and it will appear in the list below.
You can at anytime edit your synonyms through the list. Changes and new synonyms will be carried into the search index automatically every time the index is updated (once a day), but you can test the index immediately after creating or changing synonyms.
More search features and settings will be added to the solution continuously.
Implement a search UI on your website
Once configured and tested, you can implement a search UI based on the guide from Typesense. Find the guide here.
You will need three pieces of information that are found in the Search Configurator in the Raptor Control Panel:
- Search server URL
- Search API key
- Collection name