Add task to index current database state

This commit is contained in:
Eike Kettner
2020-06-18 22:38:45 +02:00
parent 146d1b0562
commit 60c079f664
12 changed files with 317 additions and 8 deletions

View File

@ -1,6 +1,7 @@
package docspell.ftsclient
import fs2.Stream
import docspell.common._
/** The fts client is the interface for docspell to a fulltext search
* engine.
@ -12,7 +13,13 @@ import fs2.Stream
*/
trait FtsClient[F[_]] {
/** Optional operation to do some initialization tasks. This is called
* exactly once and then never again. It may be used to setup the
* database.
*/
def initialize: F[Unit]
def searchBasic(q: FtsQuery): Stream[F, FtsBasicResult]
def indexData(data: Stream[F, TextData]): F[Unit]
def indexData(logger: Logger[F], data: Stream[F, TextData]): F[Unit]
}