Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#25 closed defect (released)

Segmentation fault of msearch

Reported by: Robert Pollak Owned by: Olly Betts
Priority: high Milestone:
Component: Examples Version: 0.7.5
Severity: major Keywords:
Cc: Blocked By:
Blocking: Operating System: Linux

Description

I created a new database and tried to do a boolean query

$ simpleindex db one line with linebreak $ msearch --dbdir db2 B line one AND Segmentation fault

Btw, this is probably not the correct syntax for the query. How should it look like? What's the "P" term good for? (see <http://cvs.xapian.org/xapian/xapian-examples/msearch.cc?annotate=1.13#168>)

Change History (2)

comment:1 by Olly Betts, 21 years ago

Resolution: fixed
Status: newclosed

This is already fixed in CVS - I believe by this change to xapian-core:

Fri Feb 13 23:56:44 GMT 2004 Olly Betts <olly@…>

  • api/omquery.cc,tests/api_nodb.cc: Throw error when an empty query is used to build in the binary operator Query ctor. Added regression test.

Regarding the "P", msearch has a rather strange syntax - it uses reverse polish notation to specify the boolean query. Originally we used msearch to test features of the Query and Enquire classes as we wrote them, and using RPN avoided having to write a parser. "P" and "B" switch between probabilistic and boolean parts of the query somehow, but I can't remember the details, and it's not at all clear to me from the code I'm afraid.

msearch needs to be fixed to make it a more useful example - it should probably just use Xapian::QueryParser to parse the query.

comment:2 by Olly Betts, 21 years ago

Operating System: Linux
Resolution: fixedreleased

0.8.0 contains the fix for the underlying bug. It also replaces msearch with "quest", which uses Xapian::QueryParser to provide a more sensible query syntax.

Note: See TracTickets for help on using tickets.