mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 22:56:33 +02:00
Fixed limiting local search
This commit is contained in:
@@ -297,13 +297,13 @@ public interface DaoMessage {
|
||||
Cursor getMessageFts();
|
||||
|
||||
@Query("SELECT id, account, thread, (:find IS NULL" +
|
||||
" OR `from` LIKE :find COLLATE NOCASE" + // no index
|
||||
" OR `to` LIKE :find COLLATE NOCASE" + // no index
|
||||
" OR `cc` LIKE :find COLLATE NOCASE" + // no index
|
||||
" OR `bcc` LIKE :find COLLATE NOCASE" + // no index
|
||||
" OR `subject` LIKE :find COLLATE NOCASE" + // unsuitable index
|
||||
" OR `keywords` LIKE :find COLLATE NOCASE" + // no index
|
||||
" OR `preview` LIKE :find COLLATE NOCASE) AS matched" + // no index
|
||||
" OR (:senders AND `from` LIKE :find COLLATE NOCASE)" + // no index
|
||||
" OR (:recipients AND `to` LIKE :find COLLATE NOCASE)" + // no index
|
||||
" OR (:recipients AND `cc` LIKE :find COLLATE NOCASE)" + // no index
|
||||
" OR (:recipients AND `bcc` LIKE :find COLLATE NOCASE)" + // no index
|
||||
" OR (:subject AND `subject` LIKE :find COLLATE NOCASE)" + // unsuitable index
|
||||
" OR (:keywords AND `keywords` LIKE :find COLLATE NOCASE)" + // no index
|
||||
" OR (:message AND `preview` LIKE :find COLLATE NOCASE)) AS matched" + // no index
|
||||
" FROM message" +
|
||||
" WHERE NOT ui_hide" +
|
||||
" AND (:account IS NULL OR account = :account)" +
|
||||
@@ -319,6 +319,7 @@ public interface DaoMessage {
|
||||
" LIMIT :limit OFFSET :offset")
|
||||
List<TupleMatch> matchMessages(
|
||||
Long account, Long folder, String find,
|
||||
boolean senders, boolean recipients, boolean subject, boolean keywords, boolean message,
|
||||
boolean unseen, boolean flagged, boolean hidden, boolean encrypted, boolean attachments,
|
||||
Long after, Long before,
|
||||
int limit, int offset);
|
||||
|
||||
Reference in New Issue
Block a user