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/indexer.h | |
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/indexer.h')
-rw-r--r-- | common/indexer.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/indexer.h b/common/indexer.h index 26887fb..f0b32f5 100644 --- a/common/indexer.h +++ b/common/indexer.h | |||
@@ -33,16 +33,18 @@ public: | |||
33 | virtual ~Indexer() = default; | 33 | virtual ~Indexer() = default; |
34 | typedef QSharedPointer<Indexer> Ptr; | 34 | typedef QSharedPointer<Indexer> Ptr; |
35 | virtual void add(const ApplicationDomain::ApplicationDomainType &entity) = 0; | 35 | virtual void add(const ApplicationDomain::ApplicationDomainType &entity) = 0; |
36 | virtual void modify(const ApplicationDomain::ApplicationDomainType &old, const ApplicationDomain::ApplicationDomainType &entity) = 0; | ||
37 | virtual void remove(const ApplicationDomain::ApplicationDomainType &entity) = 0; | 36 | virtual void remove(const ApplicationDomain::ApplicationDomainType &entity) = 0; |
37 | virtual void commitTransaction() {}; | ||
38 | virtual void abortTransaction() {}; | ||
38 | 39 | ||
39 | protected: | 40 | protected: |
40 | Storage::DataStore::Transaction &transaction(); | 41 | Storage::DataStore::Transaction &transaction(); |
41 | TypeIndex &index(); | 42 | TypeIndex &index(); |
43 | QByteArray mResourceInstanceIdentifier; | ||
42 | 44 | ||
43 | private: | 45 | private: |
44 | friend class ::TypeIndex; | 46 | friend class ::TypeIndex; |
45 | void setup(TypeIndex *, Storage::DataStore::Transaction *); | 47 | void setup(TypeIndex *, Storage::DataStore::Transaction *, const QByteArray &resourceId); |
46 | Storage::DataStore::Transaction *mTransaction; | 48 | Storage::DataStore::Transaction *mTransaction; |
47 | TypeIndex *mTypeIndex; | 49 | TypeIndex *mTypeIndex; |
48 | }; | 50 | }; |