-
Algolia makes a When using InfiniteHits and the user hits Show More, the Why are those facet queries necessary if all I care about is getting the next page of hits? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
In theory those requests aren't needed, however the design of InstantSearch right now is that every change does a request and we only render based on the results of the last request. infinite hits is an exception to that and still reads from previous queries through the cache. Right now I don't know how we could do those infinite hits (or pagination, as that's really the same issue) queries without re-requesting the faceting information, and this optimisation on network time may cost more in complexity of the code. I'm not sure of course, and if you have a good idea on how to contribute, we definitely welcome that! Note that the pricing of Algolia is per network request, not per query, so pricing-wise this won't make a difference. |
Beta Was this translation helpful? Give feedback.
In theory those requests aren't needed, however the design of InstantSearch right now is that every change does a request and we only render based on the results of the last request. infinite hits is an exception to that and still reads from previous queries through the cache.
Right now I don't know how we could do those infinite hits (or pagination, as that's really the same issue) queries without re-requesting the faceting information, and this optimisation on network time may cost more in complexity of the code. I'm not sure of course, and if you have a good idea on how to contribute, we definitely welcome that!
Note that the pricing of Algolia is per network request, not per query, so…