1

We are using Coveo Platform for our XM Cloud project and there is a need to implement 3 search experiences on the website.

  1. Global Site Search
  2. Blogs Search - we have a separate Sitecore page template for this content type
  3. Customer Search - we have a separate Sitecore page template for this content type

We are using Coveo atomic components to perform a search and show the results, To achieve this we wanted to create 3 search interfaces and pass the API token and Org ID, but the problem we have here is, how do we pass a parameter to Coveo to get specific set of content type for Blogs Search Component and Customer Search Component

Thank you. Siva

1 Answer 1

1

You can create three separate pipelines, each for a different interface, and apply filters in the advanced section of the query pipeline based on your search criteria. For example, in your case, Global, Blog, Customer. enter image description here

When you initialize the interface in your code with the organization ID and API token, add the corresponding pipeline name.

await searchInterface.initialize({
            accessToken: "xxxxxxx",
            organizationId: "yyyyyy",
            organizationEndpoints: await searchInterface.getOrganizationEndpoints('xxxxx'),
            search: {
                pipeline: "Your created pipeline name"
            }
        });

Alternatively, you can pass the pipeline in the component itself

<atomic-search-interface pipeline='your pipeline name' searchHub='Blog'></atomic-search-interface>

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.