[Xapian-tickets] [Xapian] #790: Operators |= and &= with Xapian::Query{}
Xapian
nobody at xapian.org
Sun Jun 30 05:54:03 BST 2019
#790: Operators |= and &= with Xapian::Query{}
-------------------------+-----------------------------
Reporter: dpa-xapian | Owner: olly
Type: defect | Status: assigned
Priority: normal | Milestone: 1.4.12
Component: Library API | Version: 1.4.11
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
-------------------------+-----------------------------
Comment (by dpa-xapian):
{{{
#include <stdio.h>
#include <xapian.h>
int main() {
std::vector<std::string> v;
printf("%i\n", Xapian::Query {Xapian::Query::OP_OR, v.begin(),
v.end()}.get_type());
}
}}}
prints 103 = LEAF_MATCH_NOTHING, which is problematic if the query is
later appended with OP_AND to another query. If v is empty, that query
will never match.
--
Ticket URL: <https://trac.xapian.org/ticket/790#comment:2>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list