#ifndef NOTMUCH_REGEXP_FIELDS_H
#define NOTMUCH_REGEXP_FIELDS_H
-#if HAVE_XAPIAN_FIELD_PROCESSOR
+
#include <sys/types.h>
#include <regex.h>
#include "database-private.h"
*/
class RegexpPostingSource : public Xapian::PostingSource
{
- protected:
+protected:
const Xapian::valueno slot_;
regex_t regexp_;
Xapian::Database db_;
RegexpPostingSource (const RegexpPostingSource &);
RegexpPostingSource &operator= (const RegexpPostingSource &);
- public:
+public:
RegexpPostingSource (Xapian::valueno slot, const std::string ®exp);
~RegexpPostingSource ();
void init (const Xapian::Database &db);
Xapian::docid get_docid () const;
bool at_end () const;
void next (unused (double min_wt));
+ void skip_to (Xapian::docid did, unused (double min_wt));
+ bool check (Xapian::docid did, unused (double min_wt));
};
class RegexpFieldProcessor : public Xapian::FieldProcessor {
- protected:
+protected:
Xapian::valueno slot;
std::string term_prefix;
+ notmuch_field_flag_t options;
Xapian::QueryParser &parser;
notmuch_database_t *notmuch;
- public:
- RegexpFieldProcessor (std::string prefix, Xapian::QueryParser &parser_, notmuch_database_t *notmuch_);
+public:
+ RegexpFieldProcessor (std::string prefix, notmuch_field_flag_t options,
+ Xapian::QueryParser &parser_, notmuch_database_t *notmuch_);
- ~RegexpFieldProcessor () { };
+ ~RegexpFieldProcessor ()
+ {
+ };
- Xapian::Query operator()(const std::string & str);
+ Xapian::Query operator() (const std::string & str);
};
-#endif
+
#endif /* NOTMUCH_REGEXP_FIELDS_H */