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

GROUP BY only model id. #372

Merged
merged 2 commits into from
Mar 12, 2021
Merged

GROUP BY only model id. #372

merged 2 commits into from
Mar 12, 2021

Conversation

balhoff
Copy link
Member

@balhoff balhoff commented Mar 4, 2021

Use aggregates for everything else, in order to align number of results returned with the number of matching models. Addresses #370

…to align number of results returned with the number of matching models.
@tmushayahama
Copy link
Contributor

tmushayahama commented Mar 12, 2021

@balhoff I tested and it seems to be working and @lpalbou #370 now brings correct count. However, the reference (PMID search) is now slow.

@kltm can you merge this so that @ukemi @vanaukenk can doo more tests

I will continue to test as see if no side effect

@lpalbou
Copy link
Contributor

lpalbou commented Mar 12, 2021

It the counts are now correct, that's good enough for me ! Thanks everyone

@lpalbou
Copy link
Contributor

lpalbou commented Mar 12, 2021

@balhoff do you think this fix will slow down the search ?

@tmushayahama while this gets deployed to prod, if you want to do more tests, the test set should contain large models with several occurrences of the same terms - that's where the search was failing due to limit/pagination on occurrences rather than models. Thanks

@kltm
Copy link
Member

kltm commented Mar 12, 2021

Ready to go to dev.

@kltm kltm merged commit bbbe4e7 into dev Mar 12, 2021
@balhoff
Copy link
Member Author

balhoff commented Mar 13, 2021

@balhoff do you think this fix will slow down the search ?

I don't think so.

@tmushayahama
Copy link
Contributor

tmushayahama commented Mar 13, 2021

@balhoff @lpalbou I think there is now a bug that the results are not sorted by date DESC. I think now its hard to find models

Then search by contributor sometimes its giving back 0 results but there is a count. And also multiple contributor
http://barista-dev.berkeleybop.org/search/models?offset=250&limit=50&contributor=http://orcid.org/0000-0002-2874-6934&expand gives n = 0 models
http://barista-dev.berkeleybop.org/search/models?offset=250&limit=50&contributor=http://orcid.org/0000-0002-2874-6934&count = n = 7

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 this pull request may close these issues.

4 participants