-
-
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
Add Trending Field to Solr #10057
base: master
Are you sure you want to change the base?
Add Trending Field to Solr #10057
Conversation
1c515e9
to
1226bbf
Compare
aecc6fd
to
5990936
Compare
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.
Niiiiice! Getting super close; next week after these changes, let's start adding these fields to prod solr I think!
docker/cron.local
Outdated
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.
@benbdeitch notes this is for testing and should be deleted 😁
return doc_data | ||
|
||
|
||
# If the arithmetic mean is below 10/7 (i.e: there have been) |
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.
Ran out of time will finish the rest
Oh I forgot, also add a dummy override of the
|
…yfork into third-try-trending
Closes #7429
This PR adds support for trending scores to Solr, allowing us to better track which works are achieving a statistically notable increase in popularity. It adds several new fields, and comes with two scripts to be run-- one daily, the other hourly, to keep this information constantly up to date.
Currently, it's still in draft mode, as there is currently no code to automatically run the scripts.
Technical
This implementation uses Solr's ability to update documents in place, which requires the new trending fields to not be stored or indexed, and instead treated as a
docValue
. Essentially, they are left out of Solr's inverted index, and instead treated as a more usual document-to-value mapping.This is both A) more performant than atomic updates, and B) avoids the issues that atomic updates can have with copyfield values.
The relevant cron commands are located in an added file,
docker/cron.local
docker compose up
.key:"/works/OL54120W"
), and check to ensure that the new fields are present.docker/cron.local
file to run the cron jobs in, along with a new container. Change the times on the cron tasks to run more frequently; (* * * * *) will make them run every minute.dbnet
andwebnet
networks, and hasdepends on: db
.Screenshot
Stakeholders
@cdrini