Merge pull request #2483 from k9mail/fts-uncorrelated-subquery

use uncorrelated subquery for fts search term
This commit is contained in:
Vincent Breitmoser 2017-04-11 17:05:53 +02:00 committed by GitHub
commit 009b40ccad

View file

@ -80,7 +80,7 @@ public class SqlQueryBuilder {
if (condition.attribute != Attribute.CONTAINS) {
Timber.e("message contents can only be matched!");
}
query.append("(EXISTS (SELECT docid FROM messages_fulltext WHERE docid = id AND fulltext MATCH ?))");
query.append("m.id IN (SELECT docid FROM messages_fulltext WHERE fulltext MATCH ?)");
selectionArgs.add(fulltextQueryString);
break;
}