Skip to content

Commit

Permalink
Add updatedAt to filter when fetching docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lenguyenthanh committed Jun 21, 2024
1 parent 5bcbebf commit 477f321
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion modules/ingestor/src/main/scala/cli.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import org.typelevel.log4cats.slf4j.Slf4jLogger

import java.time.Instant

// TODO: support flags: dry, verbose
object cli
extends CommandIOApp(
name = "lila-search-cli",
Expand Down
4 changes: 3 additions & 1 deletion modules/ingestor/src/main/scala/ingestor.forum.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ object ForumIngestor:
*> saveLastIndexedTimestamp(lastEventTimestamp.getOrElse(Instant.now()))

def run(since: Instant, until: Option[Instant], dryRun: Boolean): fs2.Stream[IO, Unit] =
val filter = range("createdAt")(since, until).or(range("erasedAt")(since, until))
val filter = range("createdAt")(since, until)
.or(range("updatedAt")(since, until))
.or(range("erasedAt")(since, until))
posts
.find(filter)
.projection(postProjection)
Expand Down

0 comments on commit 477f321

Please sign in to comment.