How to implement Deduplication
Why it is neededβ
With Theca in the SERP we do not want to show the same article (Sku) in two places on the search result page.
How to implement itβ
- The product search needs to be called first to know which Skus that will be in the product search results.
- Collect the Skus that you want to remove from the theca search results.
- Any search to the theca api can contain a number of parameters. In this example we have:
q
for the query stringk
is the number of items to returnfilterSku
has the items to be removed.
An exampleβ
Set the URL and call from backend. Please note that the Theca-Client-Token is needed in the header too.
https://api.theca.com/v1/search?q=$query&k=$items&filterSku=52293|182491