|
a/src/rcldb/rcldb_p.h |
|
b/src/rcldb/rcldb_p.h |
|
... |
|
... |
49 |
enum Op {AddOrUpdate, Delete, PurgeOrphans};
|
49 |
enum Op {AddOrUpdate, Delete, PurgeOrphans};
|
50 |
// Note that udi and uniterm are strictly equivalent and are
|
50 |
// Note that udi and uniterm are strictly equivalent and are
|
51 |
// passed both just to avoid recomputing uniterm which is
|
51 |
// passed both just to avoid recomputing uniterm which is
|
52 |
// available on the caller site.
|
52 |
// available on the caller site.
|
53 |
DbUpdTask(Op _op, const string& ud, const string& un,
|
53 |
DbUpdTask(Op _op, const string& ud, const string& un,
|
54 |
const Xapian::Document &d, size_t tl)
|
54 |
Xapian::Document *d, size_t tl)
|
55 |
: op(_op), udi(ud), uniterm(un), doc(d), txtlen(tl)
|
55 |
: op(_op), udi(ud), uniterm(un), doc(d), txtlen(tl)
|
56 |
{}
|
56 |
{}
|
57 |
// Udi and uniterm equivalently designate the doc
|
57 |
// Udi and uniterm equivalently designate the doc
|
58 |
Op op;
|
58 |
Op op;
|
59 |
string udi;
|
59 |
string udi;
|
60 |
string uniterm;
|
60 |
string uniterm;
|
61 |
Xapian::Document doc;
|
61 |
Xapian::Document *doc;
|
62 |
// txtlen is used to update the flush interval. It's -1 for a
|
62 |
// txtlen is used to update the flush interval. It's -1 for a
|
63 |
// purge because we actually don't know it, and the code fakes a
|
63 |
// purge because we actually don't know it, and the code fakes a
|
64 |
// text length based on the term count.
|
64 |
// text length based on the term count.
|
65 |
size_t txtlen;
|
65 |
size_t txtlen;
|
66 |
};
|
66 |
};
|
|
... |
|
... |
99 |
friend void *DbUpdWorker(void*);
|
99 |
friend void *DbUpdWorker(void*);
|
100 |
#endif // IDX_THREADS
|
100 |
#endif // IDX_THREADS
|
101 |
|
101 |
|
102 |
// Final steps of doc update, part which need to be single-threaded
|
102 |
// Final steps of doc update, part which need to be single-threaded
|
103 |
bool addOrUpdateWrite(const string& udi, const string& uniterm,
|
103 |
bool addOrUpdateWrite(const string& udi, const string& uniterm,
|
104 |
Xapian::Document& doc, size_t txtlen);
|
104 |
Xapian::Document *doc, size_t txtlen);
|
105 |
|
105 |
|
106 |
/** Delete all documents which are contained in the input document,
|
106 |
/** Delete all documents which are contained in the input document,
|
107 |
* which must be a file-level one.
|
107 |
* which must be a file-level one.
|
108 |
*
|
108 |
*
|
109 |
* @param onlyOrphans if true, only delete documents which have
|
109 |
* @param onlyOrphans if true, only delete documents which have
|