#community-help

Identical Multiple Requests Issue and Solution

TLDR Maaz brought up the issue of duplicate requests for the same data. Jason suggested using the react-instantsearch to control the search queries, thus optimizing request usage.

Powered by Struct AI
3
8mo
Solved
Join the chat
Jan 12, 2023 (8 months ago)
Maaz
Photo of md5-4df44ac45dd1e34e23a06df85f705fc3
Maaz
05:14 AM
Hey, there are some instances where identical requests are being hit multiple times, to fetch same data, is there any solution to stop this? If you have more requests than your displayed indices, they could be duplicating queries to the same index or querying indices that aren’t displayed. https://www.algolia.com/doc/guides/building-search-ui/going-further/optimize-search-request-usage/react/#how-to-optimize-search-request-usage
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:35 AM
The actual search queries are fully controlled by react-instantsearch. So the tips in the document will work
05:35
Jason
05:35 AM
The typesense-instantsearch-adapter, just converts all the requests generated by instantsearch into a format that Typesense understands