Tuning your search
In Search.io, you configure your search algorithm using pipelines. Pipelines are easily configurable YAML-based scripts that define a series of steps that are executed sequentially when indexing a record (record pipeline) or performing a query (query pipeline). The configuration of an intelligent search algorithm can be extremely complicated. Pipelines break down this problem into smaller pieces that can be easily mixed, matched, and combined to create an incredibly powerful search experience.
Learn more about Pipelines in the Fundamentals section.

Realtime relevance editor

Use the relevance settings to edit the pipeline generated for the collection.
In the editor you can find the query pipeline that was generated by the onboarding process. A few things have already been set up for you automatically.
At the top of the file are a number of default steps including filters and pagination that allow you to customize those aspects of the search. Additionally, steps for spelling and synonyms have already been added and will work out of the box.
Lastly, a number of boosts have been added to account for the weighting you gave different fields in the searchable fields setup step.

Boosting popularity

Let’s use an example search with the term star wars (assuming you selected the movie data set above, if not, simply follow along with an example matching your own data set).
The search preview will show the following results:
Let’s be honest, the likelihood that somebody searching for star wars is interested in “Star Wars: Episode I - The Phantom Menace” is quite low 😉.
We can fix that by taking popularity into account and give more weight to movies that match the search term but have higher popularity.
Simply add the following step to your pipeline anywhere before the postSteps: section.
- id: range-boost
consts:
field:
- value: popularity
score:
- value: "0.4"
start:
- value: "0"
end:
- value: "100"
The above step simply adds boosting for a particular value range to a specified field. In this case, the field is popularity and we give it an overall score of 0.4. However, that score will only be reached if the popularity equals or exceeds the end value of 100 and scales linearly from the start value of 0.
Once we add this step, we can see how the results instantly change to the following.
Looking a lot better!
Range boost is only one of many powerful steps that can be used to improve results and ultimately create a better search experience for your customers. Using live relevance editing and seeing results in real-time makes it easy to explore the different steps and understand the impact a change will have on search results.