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

Avoid unmarshalling QueryRes.Hits into json default types #743

Open
georgantasp opened this issue Nov 2, 2023 · 0 comments · May be fixed by #744
Open

Avoid unmarshalling QueryRes.Hits into json default types #743

georgantasp opened this issue Nov 2, 2023 · 0 comments · May be fixed by #744

Comments

@georgantasp
Copy link

georgantasp commented Nov 2, 2023

  • Algolia Client Version: v3.30.1
  • Language Version: 1.20

Description

During the unmarshalling of the QueryRes object, the existing implementation will completely unmarshal each hit object into json default types. As a result, the method QueryRes.UnmarshalHits remarshals the default types just to unmarshal again into the users's desired type. For large result sets and/or large objects, this can be wasteful.

PR incoming...
PR

Steps To Reproduce

res, _index.Search(query, params...)
algoliaObjectResults := []AlgoliaObject{}
res.UnmarshalHits(&algoliaObjectResults)
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

Successfully merging a pull request may close this issue.

1 participant