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

collections: compute number of records using "count" API instead of "search" #1866

Open
alejandromumo opened this issue Oct 31, 2024 · 0 comments

Comments

@alejandromumo
Copy link
Member

          Given that we only need to get the total n. of results, and that this task runs quite often for ALL collections, I would suggest using the `count` APIs of OpenSearch rather than a classic search, as it is more performant.

You might want to keep the search_records method in the service, and add a second one count_records.

Originally posted by @ntarocco in #1853 (comment)

@alejandromumo alejandromumo changed the title Collections: compute number of records using "count" API instead of "search" collections: compute number of records using "count" API instead of "search" Oct 31, 2024
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

1 participant