CPAN-API/metacpan-web — Issue #393: Update CPANRatings via Cron
Author: oalders
Created: 2011-11-18 19:24:28+00:00
State: open

Ratings are currently imported with the initial index and then not updated. We could fix this by re-importing the data fresh rather than updating what is currently there.

clintongormley: [12:51:52] oalders: best way to do that would be to have the ratings in a separate index. then you can have an alias pointing at the current index, rebuild to a new index, update the alias, delete the old index. that way the switch would be atomic

...

[2:07pm] clintongormley: $es->aliases(actions=>[{add=>{alias=>'ratings', index=>'ratings_20111118'}}, {remove=>{alias=>'ratings', index=>'ratings_20111117'}}])