#176 closed defect (released)
Xapian::Query with OP_AND_NOT
Reported by: | krzysztof klemm | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Library API | Version: | 1.0.1 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | Linux |
Description
hello,
I know that building query with empty and not empty objects type Xapian:Query using OP_AND_NOT doesn't have sense, but it works. If I want to show a query using method get_description() I got a SIGSEGV. I think that this situation should make a exception. I wrote a simple example of this situation below this text.
#include <xapian.h> #include <iostream>
using namespace std;
int main(int argc, char argv) {
Xapian::Query xquery;
try {
Xapian::Query xquery_term("test"); cout << "it works: " << xquery.get_description() << endl;
Xapian::Query xquery_1(Xapian::Query::OP_AND, xquery, xquery_term); cout << "it works: " << xquery_1.get_description() << endl;
Xapian::Query xquery_2(Xapian::Query::OP_AND_NOT, xquery, xquery_term); cout << "here is still ok" << endl; cout << "this it not work: " << xquery_2.get_description() << endl;
} catch (const Xapian::Error &e) {
cout << "Xapian exception" << endl;
} return 1;
}
Attachments (1)
Change History (3)
by , 18 years ago
Attachment: | query_nothing_and_not.patch added |
---|
comment:1 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 17 years ago
Operating System: | → Linux |
---|---|
Resolution: | fixed → released |
Fix is in upcoming 1.0.2 release. Marking as closed.
Patch to fix this bug