diff --git a/feeds/lille.go b/feeds/lille.go index f54074a..018c9aa 100644 --- a/feeds/lille.go +++ b/feeds/lille.go @@ -65,7 +65,7 @@ func LilleFeed(es *elasticsearch.TypedClient) *Feed { cursorTime = time.Unix(timestamp, 0) } - decayFunction := esdsl.NewDateDecayFunction().AddDecayFunctionBaseDateMathDuration("createdAt", esdsl.NewDecayPlacementDateMathDuration().Decay(0.5).Origin(strconv.FormatInt(cursorTime.UnixMilli(), 10)).Scale(esdsl.NewDuration().String("1d"))) + decayFunction := esdsl.NewDateDecayFunction().AddDecayFunctionBaseDateMathDuration("createdAt", esdsl.NewDecayPlacementDateMathDuration().Decay(0.5).Origin(strconv.FormatInt(cursorTime.UnixMilli(), 10)).Scale(esdsl.NewDuration().String("2h"))) boolQuery := esdsl.NewBoolQuery(). Should(esdsl.NewMatchQuery(indexer.TextFieldName, "Lille"), esdsl.NewMatchQuery(indexer.TextFieldName, "Lille"), diff --git a/feeds/lille_test.go b/feeds/lille_test.go index 2b756a0..afd0c1b 100644 --- a/feeds/lille_test.go +++ b/feeds/lille_test.go @@ -24,5 +24,6 @@ func TestFeedLille(t *testing.T) { }) require.NoError(t, err) assert.NotContains(t, resp.Feed, feeds.FeedResponse{Post: "at://repoDID/app.bsky.feed.post/102"}) + assert.NotContains(t, resp.Feed, feeds.FeedResponse{Post: "at://repoDID/app.bsky.feed.post/104"}) assert.Contains(t, resp.Feed, feeds.FeedResponse{Post: "at://repoDID/app.bsky.feed.post/103"}) } diff --git a/indexer/test_data.json b/indexer/test_data.json index 5e7ef23..a7cc3b8 100644 --- a/indexer/test_data.json +++ b/indexer/test_data.json @@ -100,5 +100,7 @@ {"atUri":"at://repoDID/app.bsky.feed.post/100","cid": "cid:cin099", "text": "Revoir un film d'enfance avec des yeux d'adulte et découvrir un sous-texte qu'on n'avait jamais compris, c'est fascinant.", "likes": 534, "reposts": 92, "createdAt": "2026-05-30T16:50:10Z"}, {"atUri":"at://repoDID/app.bsky.feed.post/101","cid": "cid:cin100", "text": "Le son Dolby Atmos dans une bonne salle obscure, c'est quand même la garantie d'une immersion totale.", "likes": 367, "reposts": 61, "createdAt": "2026-05-12T22:05:35Z"}, {"atUri":"at://repoDID/app.bsky.feed.post/102","cid": "cid:lil101", "text": "Merci Mel", "likes": 412, "reposts": 34, "createdAt": "2026-05-08T18:20:12Z"}, - {"atUri":"at://repoDID/app.bsky.feed.post/103","cid": "cid:lil102", "text": "Merci la MEL", "likes": 412, "reposts": 34, "createdAt": "2026-05-08T18:20:12Z"} + {"atUri":"at://repoDID/app.bsky.feed.post/103","cid": "cid:lil102", "text": "Merci la MEL", "likes": 412, "reposts": 34, "createdAt": "2026-05-08T18:20:12Z"}, + {"atUri":"at://repoDID/app.bsky.feed.post/104","cid": "cid:other103", "text": "—Me disculpaba por haberte llamado Mel en lugar de Melinoe. Pero... Merci beaucoup. Uhm… está bien, es raro, pero está bien. Me gusta, aunque todo el ruido y el movimiento a mi alrededor sea mucho... Me gusta veros felices —dijo con una sonrisa cada vez más visible.", "likes": 412, "reposts": 34, "createdAt": "2026-05-08T18:20:12Z"} + ]