Connect to a meta engine or to each engine separately, to get results from each engine

Hi elastic community,

We just started using app search in our web app, but are running into some problems.

USE CASE:
on our landing page we have 2 sections. (will be 5 soon) each section shows N posts, first section is for reviews and the other is for other posts.

we have an engine in app search for reviews and another one for other posts, also we have a meta engine that combines the two (will combine 5)

What we need is to:

either, meta engine can be limited per engine (thats part of it ) so that we can guarantee to get N amount of reviews and M amount of posts

or, connect to multiple engines, but all of them use the same elastic-ui search provider.

any idea if the first one is possible and how, if not, any idea how to implement the latter.

Cheers

Re-phrasing this for my own understanding:

You have 2 types of documents, posts and reviews. You store them in 2 separate engines. You also have a meta-engine to combine the 2.

You are using search-ui.

In your search experience, you need to make it so that you see 5 results of each type, in a single experience, using a single SearchProvider.

Option A:
Adapt your search experience to something like we have on elastic.co: https://www.elastic.co/search?q=app%20search&size=n_20_n. We have different result types, they are just hidden behind tabs.

Option B:
To get the experience you're looking for, you will have to do 2 separate API calls.

Instead of using our App Search Connector, implement your own handler that makes 2 separate App Search API calls and condenses the two result sets into a single result set. This will definitely be challenging.

@sttevan88,

Actually, just thought of this, you might be able to solve this by using grouping: https://www.elastic.co/guide/en/app-search/7.8/grouping.html. That would let you have 2 sections with 5 posts each, combined into the same set of results.

Jason

Thanks @JasonStoltz I will definitely try this approach! But looking at the API ref, it looks promising for my use-case.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.