mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 10:28:27 +00:00
Refactor findItemsWithTags to more general useful
This commit is contained in:
@ -24,6 +24,7 @@ trait FtsClient[F[_]] {
|
||||
/** Run a full-text search. */
|
||||
def search(q: FtsQuery): F[FtsResult]
|
||||
|
||||
/** Continually run a full-text search and concatenate the results. */
|
||||
def searchAll(q: FtsQuery): Stream[F, FtsResult] =
|
||||
Stream.eval(search(q)).flatMap { result =>
|
||||
if (result.results.size < q.limit) Stream.emit(result)
|
||||
|
@ -8,7 +8,8 @@ import docspell.common._
|
||||
* interpret it according to the system in use.
|
||||
*
|
||||
* Searches must only look for given collective and in the given list
|
||||
* of item ids.
|
||||
* of item ids, if it is non-empty. If the item set is empty, then
|
||||
* don't restrict the result in this way.
|
||||
*/
|
||||
final case class FtsQuery(
|
||||
q: String,
|
||||
|
Reference in New Issue
Block a user