Skip to main content

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​

  1. The product search needs to be called first to know which Skus that will be in the product search results.
  2. Collect the Skus that you want to remove from the theca search results.
  3. Any search to the theca api can contain a number of parameters. In this example we have:
    • q for the query string
    • k is the number of items to return
    • filterSku 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

Where to read more about it:​

docs.theca.com/api/search/parameters