algolia / instantsearch

⚡️ Libraries for building performant and instant search and recommend experiences with Algolia. Compatible with JavaScript, TypeScript, React and Vue.
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/
MIT License
3.73k stars 526 forks source link

fix(cache): support multi-index and multiple queries per index #6275

Closed aymeric-giraudet closed 4 months ago

aymeric-giraudet commented 4 months ago

Summary

FX-2938

Fixes part of #6258 and #6259

Result

codesandbox-ci[bot] commented 4 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ca700da2e69cab4579ee6b34a41e3480f866613f:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration
Haroenv commented 4 months ago

Which parts of https://github.com/algolia/instantsearch/issues/6258 and https://github.com/algolia/instantsearch/discussions/6259 aren't solved in this PR?

aymeric-giraudet commented 4 months ago

@Haroenv this one :

Now click on Women, there is a data request(which handles SSR via the loader using getServerState) and there is also an unnecessary client side query.

We would need to react to initialResults changes and totally opt-out of client-side requesting, or just have Remix users not call the loader if possible as it may add unnecessary overhead

And the one at the end of #6259 is unrelated too. I'll ask them to split once this is done

Haroenv commented 4 months ago

In that case I think the issue identified in https://github.com/algolia/instantsearch/issues/6258 can be marked as done, and the part where the remix integration docs is wrong can be a separate ticket :)