mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 10:28:27 +00:00
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:
@ -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 {
|
||||
|
||||
|
Reference in New Issue
Block a user