Appearance
FAQ - Search
This page contains questions regarding Relewise search functionality. If your question is not found below, please reach out to us via email or Slack.
What is the difference between Filters and Facets?
A Filter sets the conditions on which products may be shown in a search or a recommendation to begin with. This lets you define the group of potential hits that a customer may get - the sum total of the entities being evaluated.
Facets, on the other hand, are applied client-side, and serve to sort the entities according to user preference. Facets are where you apply your sorting according to size, color, material etc.
Typically, the purpose of Filters is to narrow down the potential group of entities that are targetable. You might have some products you don't want to be searched or recommended, some entities reserved for special user groups, etc. Facets are applied secondarily by the user to narrow down the hits to something more relevant for them.
It is important to distinguish between the two concepts and apply them as intended, since filtering on things like product variant data can wind up excluding more products than intended.
How do I account for hyponyms and hypernyms in my searches?
Relewise handles all types of word relations via our Synonyms feature. Hyponyms are words that belong to a subcategory of words, eg. red
and blue
are hyponyms of color
, while Hypernyms are words that belong to a category of more specific words, eg. vehicle
is a hypernym of car
and bike
. These are not innately built into the Relewise engine, but can be set up using one-way Synonyms via the MyRelewise interface. You can read more about using Synonyms in Relewise in our documentation here: Synonyms in Relewise Search
Can I add pagination to the search results?
Yes! By using the take
and skip
parameters together. If you are implemeting paginated search where you wish to show eg. 25 results per page, then you first make a search with take
= 25 and skip
= 0. This returns the first 25 items if there are 25 matches, but as a part of the response you also get the total number of hits.
An example could be that there are a total of 107 hits. Then you know that there will be a total of 5 pages and to get the second page you can set take
= 25 and skip
= 25.