Fixes searching items with fulltext

When using fulltext only search, then only the index must be searched.
This wasn't working anymore, because the routes added a query to
always select valid items (those not being processed). But this lead
to the downstream code to always consult the database, too. Since the
routes are using a "simple-search" interface, this is now adding the
valid-state condition if applicable. There are still more low-level
interfaces that can be used when searching should be done differently.

Closes: #823
This commit is contained in:
Eike Kettner
2021-05-23 01:16:44 +02:00
parent d9ed4b7bd5
commit a1a93e5ca6
9 changed files with 202 additions and 114 deletions

View File

@ -1,6 +1,9 @@
package docspell.common
case class ItemQueryString(query: String)
final case class ItemQueryString(query: String) {
def isEmpty: Boolean =
query.isEmpty
}
object ItemQueryString {