Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC]Upgrade to algoliasearch>4 #37

Open
ravivalluri opened this issue Jun 21, 2021 · 1 comment
Open

[RFC]Upgrade to algoliasearch>4 #37

ravivalluri opened this issue Jun 21, 2021 · 1 comment

Comments

@ravivalluri
Copy link

Use case (user story)
I would like to update the algoliasearch > 4.

Notes
Some functions on the index need to be updated. Since Algolia might stop the support for 3 in the future, when are you planning to upgrade?

As a developer, I'm using this library in our production environment, I want to help upgrade
@swamidass
Copy link

swamidass commented Feb 25, 2022

The current version does not work correctly with algolia, determining that records always need to be updated for some configurations of the index.

It appears that all is required to do this is change getRemoteIndex to this implementation:

async function  getRemoteIndex(index) {
  let hits = [];
  await index.browseObjects({
    query: '', // Empty query will match all records
    batch: batch => {
      hits = hits.concat(batch);
    },
    attributesToRetrieve: ["*"]
  })
  return hits
}

And, of course, bump the algoliasearch version on package.json.

Would someone like to create a pull request after testing this on their set up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants