Refactoring solr/fts migration

When re-indexing everything, skip intermediate populating the index
and do this as the very last step.

Parameterize adding new fields by their language.
This commit is contained in:
Eike Kettner
2021-01-17 11:19:27 +01:00
parent ff121d462c
commit 360cad3304
6 changed files with 40 additions and 31 deletions

View File

@ -1,5 +1,8 @@
package docspell.ftsclient
import cats.Functor
import cats.implicits._
import docspell.common._
final case class FtsMigration[F[_]](
@ -7,7 +10,13 @@ final case class FtsMigration[F[_]](
engine: Ident,
description: String,
task: F[FtsMigration.Result]
)
) {
def changeResult(f: FtsMigration.Result => FtsMigration.Result)(implicit
F: Functor[F]
): FtsMigration[F] =
copy(task = task.map(f))
}
object FtsMigration {