patrickfrey / strusUtilities

A set of command line programs to access the strus information retrieval engine
http://www.project-strus.net
Mozilla Public License 2.0
3 stars 0 forks source link

strusQuery segfault #36

Closed andreasbaumann closed 7 years ago

andreasbaumann commented 7 years ago
#0  0x00007f56a85b0477 in buildQueryTree (fields=std::vector of length 2, capacity 2 = {...}, qry=..., 
    groups=std::vector of length 2, capacity 2 = {...})
    at /home/abaumann/strus/strusAnalyzer/src/analyzer/queryAnalyzerContext.cpp:158
#1  strus::QueryAnalyzerContext::analyze (this=0x23e9fb0)
    at /home/abaumann/strus/strusAnalyzer/src/analyzer/queryAnalyzerContext.cpp:382
#2  0x00007f56ac3c7ec4 in strus::QueryStruct::translate (this=this@entry=0x7ffc618fcf60, query=..., 
    queryproc=queryproc@entry=0x1a55bb0, errorhnd=errorhnd@entry=0x1a54460)
    at /home/abaumann/strus/strusUtilities/src/program/queryStruct.cpp:99
#3  0x00007f56ac3d45a3 in strus::loadQuery (query=..., analyzer=analyzer@entry=0x1a5ae80, 
    queryproc=queryproc@entry=0x1a55bb0, source="Mark Twain\n", qdescr=..., 
    errorhnd=errorhnd@entry=0x1a54460)
    at /home/abaumann/strus/strusUtilities/src/program/programLoader.cpp:1825
#4  0x000000000040781f in main (argc_=<optimized out>, argv_=<optimized out>)
    at /home/abaumann/strus/strusUtilities/src/strusQuery/strusQuery.cpp:401

query.ana:

word = lc word word;

indexed with:

[SearchIndex]
    word = lc word author;
    word = lc word word;

query.qln contains:

Mark Twain
andreasbaumann commented 7 years ago
[Feature qry :word]
Mark Twain

results in

ERROR failed to load query from source: database transaction with error: error in query source at line 1 column 1: syntax error in query, query expression or term expected
patrickfrey commented 7 years ago

The segfault (array bounds read, if not all features defined) has been fixed. The query language has changed, see http://www.project-strus.net/grammar_query.htm