docbrown/app/models/articles/feeds
Jeremy Friesen 7a4dd3286d
Adding VariantQuery reseed randomization option (#17942)
Prior to this change, we setup our feed variant query to have a cached
randomization seed.  For a given user this seed is cached for 15
minutes.  The goal of this is to provide mostly consistent sort orders
on the feed articles during that 15 minute window.

With this change, we allow for a feed variant to say ignore the cached
seed and generate a new one for this call.

I have also added explicit settings to each of the feed variants to
reflect our desired intentions for those features.

Relates to

- forem/forem#17833
- forem/forem#17826

Closes forem/forem#17940
2022-06-16 15:04:08 -04:00
..
lever_catalog_builder.rb Allowing VariantQuery for Feed Generation (#17382) 2022-04-21 11:07:09 -04:00
order_by_lever.rb Allowing VariantQuery for Feed Generation (#17382) 2022-04-21 11:07:09 -04:00
README.md Updating documentation for the relevancy feed (#17503) 2022-04-29 09:50:05 -04:00
relevancy_lever.rb Refactoring so relevancy levers define expected variables (#17591) 2022-05-06 13:54:33 -04:00
variant_assembler.rb Adding VariantQuery reseed randomization option (#17942) 2022-06-16 15:04:08 -04:00

Feed Configuration

Welcome to the technical documentation of the Feed Configuration. It's structured as an index pointing you to related files.

Historical Documents

In addition there are two code walk throughs explaining the pull requests that introduced the VariantQuery:

So You Want to Change the Relevancy Feed

The forem/forem#17406 pull request contains an example of configuring a VariantQuery You can also read the config/feed-variants/README.md for further context.

Understanding the Variant Query

In Diving into Dev's Relevancy Feed Builder we explained the conceptual implementation; providing a conceptual entity relationship and sequence diagrams.

The key thing to understand is as follows: We create a SQL statement that calculates a relevancy_score for a given user and each article in the Forem instance. The higher the article's relevancy_score, the closer that article will be to the top of the feed.