sql error message after activation

schildi - August 24, 2007 - 11:50
Project:Fuzzy Search
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

After activation I got the message:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AUTO_IMCREMENT PRIMARY KEY, nid int(11) NOT NULL, word_id int(11' at line 2 query: CREATE TABLE search_fuzzy_index ( id int(11) NOT NULL AUTO_IMCREMENT PRIMARY KEY, nid int(11) NOT NULL, word_id int(11) NOT NULL, ngram varchar(6) character set utf8 NOT NULL, completeness double NOT NULL, score decimal(8,2) NOT NULL, ) in /home/www/web14/html/drupal/includes/database.mysql.inc on line 172.

DB: mysql 4.1.10a

regards
Schildi

#1

BlakeLucchesi - August 24, 2007 - 20:08
Status:active» fixed

Very sorry for the issue, it was a very dumb mistake on my part because there was a typo in the sql query. The fix was just published to the latest dev release (it takes 12 hours to be built). You can see the fix here and make the quick change on your own if you need it faster: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/fuzzysearch...

Thanks for submitting this and I apologize for the issue.

#2

schildi - August 27, 2007 - 14:03

thank you for your quick response.
Sorry, but for my own purpose I already corrected the typos.

Regards
Schildi

#3

schildi - August 27, 2007 - 14:14

By the way,

do you plan to integrate the fuzzy search with the "core" search?
My idea is that there could be some control in the extended search options to adjust the "completeness". The lowest possible value will determine that an ordinary search is required. Any other value will start the fuzzy search. And all other filter setting from the extended search options will be considered.

Regards
Schildi

#4

BlakeLucchesi - August 27, 2007 - 23:19

You actually should be able to control this somewhat, by specifying how complete each word needs to be you can ensure that matches are more restricted. It gets pretty sticky when writing the sql to make sure an exact phrase match is done. I guess you would have to make sure that the word matches were at a completeness of 90% or better and then based on # of words in the query you would have a total completeness factor (300 for a 3 word phrase) and then filter out any results that had total completeness < 290 or so.

So in theory I guess this is possible, but I'd say we wait a bit to ensure that this more basic level engine is working solidly before messing around with the query in that way. Thanks for posting all your bugs and ideas, its definitely appreciated.

#5

schildi - August 28, 2007 - 00:51

ok, but the completeness can only be adjusted as user admin in settings. No normal user can do it. This control should be moved to the search block.

Regards
Schildi

#6

Anonymous - September 11, 2007 - 01:31
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.