How to show number of exact-keyword results and suggest-keyword results, grouped by Categories

Let’s say
I’m typing “pants” in search box
and the result will show like:

- pants in Women (xxx)
- pants in Men (xx)
- pants slim in Men (xxx)
- long pants in Men (xx)

Just like this website:



1. What features (or document) I’m looking for?
2. Is there any additional data we need to input?

We’re about to upgrade plan,
Thanks in advance :wink:

Hi @tech2,

Thanks for contacting us. If I understand your questions correctly:

1-This seems close to our autocomplete.js library. You can also potentially use the InstantSearch.js library to implement an InstantSearch experience.
2- I am not sure what you mean by this particular question. If you mean how to index your data to get this kind of result, you can check our indexing overview.


Thanks for the reply,

The 2nd question is about…
My data right now seems not enough for showing results like example given.
I can search and count only result of exact keywords.
But cannot count results of autocomplete words.


@tech2 I see what you mean. You will probably have to use face counts in that case. Check out what they say about it here.

Enabling faceting on attributes will compute facet counts for each facet value, and the list of values + counts is updated and returned with each search result. This ensures the user always gets a relevant and contextual set of filters and information along with the results.