Ticket #296: query.cc.diff
File query.cc.diff, 1.1 KB (added by , 16 years ago) |
---|
-
query.cc
old new 236 236 } 237 237 238 238 try { 239 query = qp.parse_query(query_string); 239 query = qp.parse_query(query_string, 240 qp.FLAG_PHRASE | 241 qp.FLAG_BOOLEAN | 242 qp.FLAG_LOVEHATE | 243 qp.FLAG_SPELLING_CORRECTION); 240 244 } catch (Xapian::QueryParserError &e) { 241 245 error_msg = e.get_msg(); 242 246 return BAD_QUERY; … … 799 803 CMD_stoplist, 800 804 CMD_sub, 801 805 CMD_substr, 806 CMD_suggestion, 802 807 CMD_terms, 803 808 CMD_thispage, 804 809 CMD_time, … … 918 923 T(stoplist, 0, 0, N, Q), // return list of stopped terms 919 924 T(sub, 2, 2, N, 0), // subtract 920 925 T(substr, 2, 3, N, 0), // substring 926 T(suggestion, 0, 0, N, Q), // misspelled word correction suggestion 921 927 T(terms, 0, 0, N, M), // list of matching terms 922 928 T(thispage, 0, 0, N, M), // page number of current page 923 929 T(time, 0, 0, N, M), // how long the match took (in seconds) … … 1767 1773 value = args[0].substr(start, len); 1768 1774 break; 1769 1775 } 1776 case CMD_suggestion: 1777 value = qp.get_corrected_query_string(); 1778 break; 1770 1779 case CMD_terms: 1771 1780 if (enquire) { 1772 1781 // list of matching terms