>Description: It appears that MySQL can have trouble with a searchterm in a boolean-mode fulltext index search which is both prefixed with + and suffixed with *, when that searchterm is paired with another required term. The empty set is returned when there are rows which should match. >How-To-Repeat: I have not been able to duplicate this bug in a test case, but it is clearly occurring in my actual table, as the following demonstrates:
mysql> SELECT article_id as id, title FROM search WHERE MATCH(title) AGAINST ('+Anabaptists +Reist' IN BOOLEAN MODE); +------+-------------------------------------------------+ | id | title | +------+-------------------------------------------------+ | 2538 | Hans Reist House and the "Vale of Anabaptists." | +------+-------------------------------------------------+ 1 row in set (0.01 sec) mysql> SELECT article_id as id, title FROM search WHERE MATCH(title) AGAINST ('+Anabapt* +Reist' IN BOOLEAN MODE); Empty set (0.01 sec) But this is odd - if I replace Reist with Hans, I now get a different row entirely: mysql> SELECT article_id as id, title FROM search WHERE MATCH(title) AGAINST ('+Anabapt* +Hans' IN BOOLEAN MODE); +-----+--------------------------------------------------------------------+ | id | title | +-----+--------------------------------------------------------------------+ | 462 | Hans Landis of Zurich (d. 1614): the last Swiss Anabaptist martyr. | +-----+--------------------------------------------------------------------+ 1 row in set (0.01 sec) The only possible key that I've come up with is that "Anabaptist" or "Anabaptists" is a fairly common word in this field - appears in 296 out of 3249 rows - but not nearly half or anything like that. Unfortunately, I have not been able to find another word that causes this bug. If it matters, I have dropped and recreated the table several times. I have tried creating the fulltext index both before and after inserting the data. >Fix: As I haven't been able to isolate the exact nature of the bug, I don't know of a fix or workaround. >Submitter-Id: <submitter ID> >Originator: Carl J Meyer >Organization: Mennonite.net >MySQL support: none >Synopsis: boolean-mode fulltext search: problems with +searchterm* >Severity: serious >Priority: medium >Category: mysql >Class: sw-bug >Release: mysql-4.0.1-alpha (Official MySQL RPM) >Environment: System: Linux mennonet1 2.4.17 #2 SMP Tue Jan 29 12:37:22 EST 2002 i686 unknown Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98) Compilation info: CC='gcc' CFLAGS='-O6 -fno-omit-frame-pointer -mpentium' CXX='gcc' CXXFLAGS='-O6 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -mpentium' LDFLAGS='' LIBC: lrwxrwxrwx 1 root root 13 Apr 10 17:12 /lib/libc.so.6 -> libc-2.2.4.so -rwxr-xr-x 2 root root 1285788 Apr 2 11:58 /lib/libc-2.2.4.so -rw-r--r-- 1 root root 27332668 Apr 2 11:42 /usr/lib/libc.a -rw-r--r-- 1 root root 178 Apr 2 11:42 /usr/lib/libc.so Configure command: ./configure --disable-shared --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --without-berkeley-db --with-innodb --enable-assembler --with-mysqld-user=mysql --with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/ --with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql --infodir=/usr/info --includedir=/usr/include --mandir=/usr/man --with-embedded-server --enable-thread-safe-client '--with-comment=Official MySQL RPM' --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php