Using full-text search without indexes #482

Open
opened 2026-10-05 00:00:40 +02:00 by adam · 1 comment
Owner

Noticed these on my production site:

Warning:  [mysql error 1191] Can't find FULLTEXT index matching the column list
SELECT * FROM tags
WHERE (MATCH(name) AGAINST( 'help helps' IN BOOLEAN MODE)) in /**/include/dblayer/functions_mysqli.inc.php on line 832
Fatal error: Call to a member function fetch_assoc() on a non-object in /**/include/dblayer/functions_mysqli.inc.php on line 213

Then after fixing the above:

Warning:  [mysql error 1191] Can't find FULLTEXT index matching the column list
SELECT id from images i WHERE
(CONVERT(file, CHAR) LIKE '%help%'
 OR MATCH(name, comment) AGAINST( 'help helps' IN BOOLEAN MODE)) in /**/include/dblayer/functions_mysqli.inc.php on line 832
Fatal error: Call to a member function fetch_assoc() on a non-object in /**/include/dblayer/functions_mysqli.inc.php on line 893

Fixed with:

ALTER TABLE `tags` ADD FULLTEXT INDEX `name_ft` (`name` ASC);
ALTER TABLE `images` ADD FULLTEXT INDEX `name_comment_ft` (`name` ASC, `comment` ASC);
Noticed these on my production site: ``` Warning: [mysql error 1191] Can't find FULLTEXT index matching the column list SELECT * FROM tags WHERE (MATCH(name) AGAINST( 'help helps' IN BOOLEAN MODE)) in /**/include/dblayer/functions_mysqli.inc.php on line 832 Fatal error: Call to a member function fetch_assoc() on a non-object in /**/include/dblayer/functions_mysqli.inc.php on line 213 ``` Then after fixing the above: ``` Warning: [mysql error 1191] Can't find FULLTEXT index matching the column list SELECT id from images i WHERE (CONVERT(file, CHAR) LIKE '%help%' OR MATCH(name, comment) AGAINST( 'help helps' IN BOOLEAN MODE)) in /**/include/dblayer/functions_mysqli.inc.php on line 832 Fatal error: Call to a member function fetch_assoc() on a non-object in /**/include/dblayer/functions_mysqli.inc.php on line 893 ``` Fixed with: ``` ALTER TABLE `tags` ADD FULLTEXT INDEX `name_ft` (`name` ASC); ALTER TABLE `images` ADD FULLTEXT INDEX `name_comment_ft` (`name` ASC, `comment` ASC); ``` <!-- github-sync-id:173643203 -->
Author
Owner

Very odd. Fulltext indexes should not be required for those queries... Can you look if your table are standard MyISAM types ?

Very odd. Fulltext indexes should not be required for those queries... Can you look if your table are standard MyISAM types ? <!-- github-comment-id:243078761 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#482