Allow searching on attachment name and type

pull/182/head
M66B 4 years ago
parent f07374fa08
commit 97429fd128

@ -310,7 +310,9 @@ public interface DaoMessage {
" OR (:recipients AND `bcc` 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 (:subject AND `subject` LIKE :find COLLATE NOCASE)" + // unsuitable index
" OR (:keywords AND `keywords` LIKE :find COLLATE NOCASE)" + // no index " OR (:keywords AND `keywords` LIKE :find COLLATE NOCASE)" + // no index
" OR (:message AND `preview` LIKE :find COLLATE NOCASE)) AS matched" + // no index " OR (:message AND `preview` LIKE :find COLLATE NOCASE)" +
" OR (:attachments AND attachment.name LIKE :find COLLATE NOCASE)" +
" OR (:attachments AND attachment.type LIKE :find COLLATE NOCASE)) AS matched" + // no index
" FROM message" + " FROM message" +
" LEFT JOIN attachment ON attachment.message = message.id" + " LEFT JOIN attachment ON attachment.message = message.id" +
" WHERE NOT ui_hide" + " WHERE NOT ui_hide" +

Loading…
Cancel
Save