mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-01 08:48:46 +02:00
ef4c5eb65e
Please note we have force-pushed a new initial commit in order to remove some publicly-available Twitter user information. Note that this process may be required in the future.
25 lines
1.2 KiB
Scala
25 lines
1.2 KiB
Scala
package com.twitter.timelineranker.core
|
|
|
|
import com.twitter.recos.user_tweet_entity_graph.thriftscala.TweetRecommendation
|
|
import com.twitter.search.earlybird.thriftscala.ThriftSearchResult
|
|
import com.twitter.timelineranker.model.RecapQuery
|
|
import com.twitter.timelines.model.TweetId
|
|
|
|
object CandidateEnvelope {
|
|
val EmptySearchResults: Seq[ThriftSearchResult] = Seq.empty[ThriftSearchResult]
|
|
val EmptyHydratedTweets: HydratedTweets = HydratedTweets(Seq.empty, Seq.empty)
|
|
val EmptyUtegResults: Map[TweetId, TweetRecommendation] = Map.empty[TweetId, TweetRecommendation]
|
|
}
|
|
|
|
case class CandidateEnvelope(
|
|
query: RecapQuery,
|
|
searchResults: Seq[ThriftSearchResult] = CandidateEnvelope.EmptySearchResults,
|
|
utegResults: Map[TweetId, TweetRecommendation] = CandidateEnvelope.EmptyUtegResults,
|
|
hydratedTweets: HydratedTweets = CandidateEnvelope.EmptyHydratedTweets,
|
|
followGraphData: FollowGraphDataFuture = FollowGraphDataFuture.EmptyFollowGraphDataFuture,
|
|
// The source tweets are
|
|
// - the retweeted tweet, for retweets
|
|
// - the inReplyTo tweet, for extended replies
|
|
sourceSearchResults: Seq[ThriftSearchResult] = CandidateEnvelope.EmptySearchResults,
|
|
sourceHydratedTweets: HydratedTweets = CandidateEnvelope.EmptyHydratedTweets)
|