If search results aren’t what you expect them to be, you can investigate what’s happening with a two-step approach:
This approach helps you find out why your search behaves a certain way and lets you test improvements and fixes.
Retrieving search parameters
The first step in troubleshooting is to clarify precisely the search parameters you sent to Algolia, to see what’s returned and make sure that it matches your intent. To find what search parameters are being used, you can use your browser’s developer tools to check what form data you sent in your search requests.
- Open your browser’s developer tools (Chrome or Firefox).
- Check the form data:
- Click Network and set “algolia” as a filter.
- Enter your search request. You should see network requests to Algolia.
- Click the latest request.
- Scroll to Form Data (Chrome) or click on Request (Firefox).
Check parameters in the browser developer tools
- Check the index name. Is it correct?
- Check the query. Has your search application incorrectly changed it?
- Investigate parameters that can alter search results, for example,
filterswhich are other commonly used parameters that can alter search results. See the API documentation for the complete list of parameters.
Reproduce the search in Algolia’s dashboard
Use the dashboard to reproduce the same search queries and parameters that you tested in the browser. This process:
- Helps determine if your code is changing search in an undesirable way by comparing results between your app and the dashboard.
- Allows you to test potential improvements on the dashboard.
How to reproduce search queries and parameters
Go to your index in the Algolia dashboard and click Add Query Parameter in the Browse tab.
- Add tag, facet, and numeric filters in the Filters tab.
- Add other search parameters as JSON in the Custom tab.