How to get results in different categories?

{“channelName”:“sourya v”,
“description”:“blah blah”,
“channelIcon”:“dummyurl”,
“channelId”:“2ojXGBdBEqiqM7”,
videoThumbnail: “someurl”,
videoTitle:“awesome video”
},
{“channelName”:“john art”,
“description”:“blah blah”,
“channelIcon”:“dummyurl”,
“channelId”:“2ojXGBerjhjqiqM7”,
videoThumbnail: “someurl”,
videoTitle: “dskjgfskj”
},

I have data like this and searches through channel name and videoTitle using vue instant search.
But I need the results in two different categories Like old Twitch search results.

  1. Videos which display a list of videos matching the video title/description
  2. Channels which display a list of channel name and channel icon.

How can I separate like how vuetify is separating the results into cards, carousels, etc…
I want results under two categories as videos and channels.
How can I implement this?

Hi @soury.bunny,

If i understand correctly, you would like to list search results targeting the videos attribute and then another list of search results which target the channelName attribute. Is this correct?

To achieve something like this, you would need two indices with different searchable attributes set in the index configuration.

In one index you would make videoTitle the topmost searchable attribute (and possibly the only searchable attribute) and then another index with the ‘channelName’ the topmost searchable attribute).

You could then perform two different searches on the two different indices when someone types in the search box; One search on the Videos index, and the second search on the Channels index. Then you could append the results from the second search to the end of the first search.

This will allow you to style the dropdown, however you would like, with the results from each search in separate areas.

Let us know how this works for you or if I’ve misunderstood your question!