-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Aggregate want to read counts by author #9545
Aggregate want to read counts by author #9545
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! Some code feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm! Tested case where no counts, and no facets and it worked. Tested adding a work to currently reading, solr update, edit author, solr update, and the counts were updated!
Closes #9359
This PR adds summed counts for each of an authors's works' readinglog counts to the author, which will be useful for popularity measures later down the line.
Technical
The request sent to Solr has been changed to use the Solr JSON endpoint, thus necessitating it to be a POST request rather than GET. This allows for aggregations like 'sum' to be easily executed within the request.
A few changes to the return format were made, due to the way in which the Facet API returns data. Notably, each facet is now under the same category, with 'subject', 'place' and '
Testing
Simply edit an author's page or reindex their key via the Admin Solr endpoint, and look for the new 'want_to_read_count' or 'readinglog_facets` categories upon requesting their Solr data.
Screenshot
Stakeholders
@cdrini