diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-10-13 18:38:35 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-02-11 23:03:17 +0100 |
commit | 6051c1247cde61bcc8e483eb4166e5a297c0ecc6 (patch) | |
tree | df3aba1ef4011f2640b17c8cf7a9b106933231ab /common/query.cpp | |
parent | 8740a007515dcf1b315d69ab5c64fcfd40ec980c (diff) | |
download | sink-6051c1247cde61bcc8e483eb4166e5a297c0ecc6.tar.gz sink-6051c1247cde61bcc8e483eb4166e5a297c0ecc6.zip |
Xapian based fulltext indexing
This cuts into the sync performance by about 40%,
but gives us fast fulltext searching for all local content.
Diffstat (limited to 'common/query.cpp')
-rw-r--r-- | common/query.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/query.cpp b/common/query.cpp index 3dc8f99..5f6d095 100644 --- a/common/query.cpp +++ b/common/query.cpp | |||
@@ -34,6 +34,8 @@ QDebug operator<<(QDebug dbg, const Sink::QueryBase::Comparator &c) | |||
34 | dbg.nospace() << "contains " << c.value; | 34 | dbg.nospace() << "contains " << c.value; |
35 | } else if (c.comparator == Sink::Query::Comparator::In) { | 35 | } else if (c.comparator == Sink::Query::Comparator::In) { |
36 | dbg.nospace() << "in " << c.value; | 36 | dbg.nospace() << "in " << c.value; |
37 | } else if (c.comparator == Sink::Query::Comparator::Fulltext) { | ||
38 | dbg.nospace() << "fulltext contains " << c.value; | ||
37 | } else { | 39 | } else { |
38 | dbg.nospace() << "unknown comparator: " << c.value; | 40 | dbg.nospace() << "unknown comparator: " << c.value; |
39 | } | 41 | } |
@@ -169,6 +171,7 @@ bool QueryBase::Comparator::matches(const QVariant &v) const | |||
169 | return false; | 171 | return false; |
170 | } | 172 | } |
171 | return value.value<QByteArrayList>().contains(v.toByteArray()); | 173 | return value.value<QByteArrayList>().contains(v.toByteArray()); |
174 | case Fulltext: | ||
172 | case Invalid: | 175 | case Invalid: |
173 | default: | 176 | default: |
174 | break; | 177 | break; |