Hello all,
I have come across this error during this complex search "Historia not informatyki"
Wystąpił błąd składni w zapytaniu do bazy danych. Mogło to być spowodowane przez złe sformułowanie zapytania (zobacz Przeszukiwanie Wikipedii) albo przez błąd w oprogramowaniu. Ostatnie, nieudane zapytanie to:
SELECT cur_id,cur_namespace,cur_title,cur_text FROM cur,searchindex WHERE cur_id=si_page AND ( (MATCH (si_title) AGAINST ('historia')) NOT (MATCH (si_title) AGAINST ('informatyki')) ) AND (cur_namespace=0) LIMIT 0, 20
wysłane przez funkcję "SearchEngine::showResults". MySQL zgłosił błąd "1064: You have an error in your SQL syntax near '(MATCH (si_title) AGAINST ('informatyki')) ) AND (cur_namespace=0) LIMIT 0, 20' at line 1". "Historia and Polski" seems to work OK.
Can you fix it ?
Regards, Kpjas.
On Mon, Mar 10, 2003 at 09:40:10PM +0100, Krzysztof P. Jasiutowicz wrote:
Hello all,
I have come across this error during this complex search "Historia not informatyki"
Wyst?pi? b??d sk?adni w zapytaniu do bazy danych. Mog?o to by? spowodowane przez z?e sformu?owanie zapytania (zobacz Przeszukiwanie Wikipedii) albo przez b??d w oprogramowaniu. Ostatnie, nieudane zapytanie to:
SELECT cur_id,cur_namespace,cur_title,cur_text FROM cur,searchindex WHERE cur_id=si_page AND ( (MATCH (si_title) AGAINST ('historia')) NOT (MATCH (si_title) AGAINST ('informatyki')) ) AND (cur_namespace=0) LIMIT 0, 20
wys?ane przez funkcj? "SearchEngine::showResults". MySQL zg?osi? b??d "1064: You have an error in your SQL syntax near '(MATCH (si_title) AGAINST ('informatyki')) ) AND (cur_namespace=0) LIMIT 0, 20' at line 1". "Historia and Polski" seems to work OK.
Can you fix it ?
Is this really a bug?
"Historia and not informatyki" should work.
Regards,
jeluf
Jens Frank wrote:
"Historia and Polski" seems to work OK.
Can you fix it ?
Is this really a bug?
"Historia and not informatyki" should work.
I think in one sense it is not a bug (not OUR bug anyway) but in another sense it is. We're just passing a query to SQL here, and it does what it does. It would be nice (in a perfect world) if we did what the user expected here, rather than astonishing them in this way.
I'm not sure how easy it is to fix, though, without writing a more complicated search parser, which might not be a good use of time right now.
wikitech-l@lists.wikimedia.org