Mailing List Archive

Search problem - Polish Wikipedia
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.
--
Re: Search problem - Polish Wikipedia [ In reply to ]
On Mon, 10 Mar 2003, Krzysztof P. Jasiutowicz wrote:
> I have come across this error during this complex search
> "Historia not informatyki"

Try "historia and not informatyki".

-- brion vibber (brion @ pobox.com)
Re: Search problem - Polish Wikipedia [ In reply to ]
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
Re: Search problem - Polish Wikipedia [ In reply to ]
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.