diff options
| author | David Bremner <david@tethera.net> | 2017-03-29 20:58:34 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-03-29 20:58:34 -0300 |
| commit | e1c1d33f3726f5cadb2f92d23735dcd1102fbc88 (patch) | |
| tree | 6618e2a4142ed707ae96b5a7abf1e215a6195f69 /lib | |
| parent | 949a5ac4d40fae1ab28e1e310c1b3cf130782d33 (diff) | |
| parent | a30a78909a501aad3ecf4dd29fe5760ae902aab1 (diff) | |
Merge branch 'release'
Another regexp search fix.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/regexp-fields.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/regexp-fields.cc b/lib/regexp-fields.cc index 9dcf9732..1651677c 100644 --- a/lib/regexp-fields.cc +++ b/lib/regexp-fields.cc @@ -148,6 +148,11 @@ RegexpFieldProcessor::RegexpFieldProcessor (std::string prefix, Xapian::QueryPar Xapian::Query RegexpFieldProcessor::operator() (const std::string & str) { + if (str.size () == 0) + return Xapian::Query(Xapian::Query::OP_AND_NOT, + Xapian::Query::MatchAll, + Xapian::Query (Xapian::Query::OP_WILDCARD, term_prefix)); + if (str.at (0) == '/') { if (str.at (str.size () - 1) == '/'){ RegexpPostingSource *postings = new RegexpPostingSource (slot, str.substr(1,str.size () - 2)); |
