getObjects with filters

I’d like to be able to perform filtering on a selected number of ObjectIds.

Is this possible in instantsearch?

For example:
Within posts 5, 9, 15, 17, find the entries that have cellphone in the title

Thank you

Hi @to.jontan_gift,

Yes, it’s possible using the filters in the configure widget.

search.addWidget(
  instantsearch.widgets.configure({
     filters: 'objectID:"12215692" OR objectID:"12215672"',
  })
);

I have created a codesandbox for you to demonstrate the solution here.

Notice line 20 in the app.js file is commented out so that you can see all of the records in the index.

If you uncomment that line, you will see that only the objectID’s that I’ve included in the filter will show.

Searching by cellphone will limit the search to only those objectID’s included in that line of code.

Let me know how this works for you!