You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We import the useInfiniteHits from react-instantsearch-core in a react native project.
On our infinite hits display we've noticed the seldom appearance of duplicates of items shown previously in the hits.
Our investigation has found that the hits property found in the API returned by useInfiniteHits had the duplicates of items that had the exact same objectID, and were the same in every other aspect but ranking.
The duplicates show up in consecutive queries usually:
And their only difference shown in ranking:
We've attempted to use your distinct property, but we could only use it with objectID which doesn't seem to work and that shouldn't be necessary either.
My questions here are:
Is there some ranking configuration or hook configuration that we're missing to fix this scenario?
Our platform constantly adds entries to the index. Could ranking be affected by new entries being added to the index? How would that affect ongoing queries?
Is there a way for the algolia search to filter objectID duplicates before return? We wouldn't like to filter it ourselves on client side, since on an infinite scroll, at some point it could get to be a costly operation.
🔍 Steps to reproduce
Scroll down on a view that uses useInfiniteHits.
I believe for it to actually be triggered you should be adding entries to the index that could affect the ranking, from one query to the next.
Live reproduction
Don't really know how to reproduce it on a sandbox. Read the steps to reproduce
💭 Expected behavior
We'd expect that data doesn't get duplicated. Hopefully the query would automatically exclude duplicates based on objectID, but otherwise an opt-in feature could allow you to remove that on query time.
Package version
react-instantsearch-core 7.3.0
Operating system
No response
Browser
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
🐛 Current behavior
We import the
useInfiniteHits
fromreact-instantsearch-core
in a react native project.On our infinite hits display we've noticed the seldom appearance of duplicates of items shown previously in the hits.
Our investigation has found that the
hits
property found in the API returned byuseInfiniteHits
had the duplicates of items that had the exact sameobjectID
, and were the same in every other aspect but ranking.The duplicates show up in consecutive queries usually:
And their only difference shown in ranking:
We've attempted to use your
distinct
property, but we could only use it with objectID which doesn't seem to work and that shouldn't be necessary either.My questions here are:
objectID
duplicates before return? We wouldn't like to filter it ourselves on client side, since on an infinite scroll, at some point it could get to be a costly operation.🔍 Steps to reproduce
Scroll down on a view that uses
useInfiniteHits
.I believe for it to actually be triggered you should be adding entries to the index that could affect the ranking, from one query to the next.
Live reproduction
Don't really know how to reproduce it on a sandbox. Read the steps to reproduce
💭 Expected behavior
We'd expect that data doesn't get duplicated. Hopefully the query would automatically exclude duplicates based on
objectID
, but otherwise an opt-in feature could allow you to remove that on query time.Package version
react-instantsearch-core 7.3.0
Operating system
No response
Browser
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: