ReactInstantSearch records not showing

I am trying to integrate Algolia into my React application. Using the code snippet from their media example. I tried to change the value of app_id and search_only_api_key to one that I currently own, as well as change the index name to reviews, which I currently have 2 records of. I am expecting to see the Stats Widget showing “2 results found in X ms”, but instead it shows me “0 results found in 3 ms”. Does anyone know what kind of steps I’m missing out in reusing the code from the example snippet? Do ask if more information is needed.

Hello there!

If I understand your steps well:

  1. You copied the entire media demo.
  2. You changed the application ID and search API key here with your own.
  3. You changed the index name here with your own.

Now when you’re testing, the stats widget shows you that it didn’t retrieve any results.

There could be several reasons:

  • You’re not targeting the right index. Try and look for typos.
  • You have a query or filters that are too restrictive. Try to remove all refinements and try again.

If this doesn’t work, can you please share your demo as a reproducible CodeSandbox so we can help you debug it?