Add language to schema, extend fts-client

This commit is contained in:
Eike Kettner
2020-06-20 22:27:26 +02:00
parent 3576c45d1a
commit 1f4ff0d4c4
13 changed files with 145 additions and 54 deletions

View File

@ -48,17 +48,14 @@ object OFulltext {
batch: Batch,
search: (Query, Batch) => F[Vector[A]]
): Stream[F, A] = {
val fq = FtsQuery(ftsQ, q.collective, batch.limit, batch.offset, Nil)
val fq = FtsQuery(ftsQ, q.collective, Nil, batch.limit, batch.offset)
val qres =
for {
items <-
fts
.searchBasic(fq)
.flatMap(r => Stream.emits(r.results))
.map(_.itemId)
.compile
.toVector
.search(fq)
.map(_.results.map(_.itemId))
.map(_.toSet)
sq = q.copy(itemIds = Some(items))
res <- search(sq, batch)