[PATCH 2/2] lib: handle empty string in regexp field processors

2017-03-24 Thread David Bremner
The non-field processor behaviour is is convert the corresponding queries into a search for the unprefixed terms. This yields pretty surprising results so I decided to generate a query that would match the terms (i.e. none with that prefix) generated for an empty header. --- lib/regexp-fields.cc

Re: [PATCH 2/2] lib: handle empty string in regexp field processors

2017-03-25 Thread David Bremner
David Bremner writes: > +if (str.size () == 0) > + return Xapian::Query(Xapian::Query::OP_AND_NOT, > + Xapian::Query::MatchAll, > + Xapian::Query (Xapian::Query::OP_WILDCARD, > term_prefix)); > + Full disclosure, this is a pretty expensi