mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-04-04 10:29:34 +00:00
Reformat source with sbt-fix
Signed-off-by: martin f. krafft <madduck@madduck.net>
This commit is contained in:
parent
f1986fc518
commit
8d560b71ac
@ -32,9 +32,9 @@ object FtsRepository extends DoobieMeta {
|
|||||||
val query = mkQueryPart(pq, q)
|
val query = mkQueryPart(pq, q)
|
||||||
|
|
||||||
fr"""select count(id), coalesce(max($selectRank), 0)
|
fr"""select count(id), coalesce(max($selectRank), 0)
|
||||||
|from $table, $query
|
|from $table, $query
|
||||||
|where ${mkCondition(q)} AND query @@ text_index
|
|where ${mkCondition(q)} AND query @@ text_index
|
||||||
|""".stripMargin
|
|""".stripMargin
|
||||||
.query[SearchSummary]
|
.query[SearchSummary]
|
||||||
.unique
|
.unique
|
||||||
}
|
}
|
||||||
@ -65,12 +65,12 @@ object FtsRepository extends DoobieMeta {
|
|||||||
|
|
||||||
val sqlFrag =
|
val sqlFrag =
|
||||||
fr"""select $select
|
fr"""select $select
|
||||||
|from $table, $query
|
|from $table, $query
|
||||||
|where ${mkCondition(q)} AND query @@ text_index
|
|where ${mkCondition(q)} AND query @@ text_index
|
||||||
|order by rank desc
|
|order by rank desc
|
||||||
|limit ${q.limit}
|
|limit ${q.limit}
|
||||||
|offset ${q.offset}
|
|offset ${q.offset}
|
||||||
|""".stripMargin
|
|""".stripMargin
|
||||||
|
|
||||||
logger.asUnsafe.trace(s"PSQL Fulltext query: $sqlFrag")
|
logger.asUnsafe.trace(s"PSQL Fulltext query: $sqlFrag")
|
||||||
sqlFrag.query[SearchResult].to[Vector]
|
sqlFrag.query[SearchResult].to[Vector]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user