Using only a subset of records to search through

There was a similar question about this on this board, but don’t want to kick old topics to the top.

We have an index containing several types of articles, e.g. ‘news’, ‘general’, ‘feature’, etc. This index will be used on a search page with some simple filter options. So far, so good.

We want to create a separate search page with similar search options (search field and filter), but here the search operations should only happen on those articles of 1 specific type, e.g. only search and filter through news articles.

What would be the best practise for this? Will a replica index work for this use case? Is it better to do something on the frontend with the API’s?

Thanks.

Hi @ritchie.warsitoatmod, would using a filter on the type: ‘news’ in addition to your other filters work? You can use AND and OR in the filters as seen in this documentation.

Hi @cindy.cullen, thanks and apologies for the late reply. I don’t think this will be sufficient for our use case, at least that’s what I understood from our developer. To be clear, we are using the React InstantSearch widget at the moment.

Basically, we would just like to retrieve only part of an index (so only the records that are of type “news”) and in the frontend / widget do the normal searching and facet filtering on those records. Is something like this possible with the InstantSearch widget or do we need to resort to an API approach?