Page 2 of 2

Posted: Tue Apr 22, 2008 4:09 pm
by Zak77
Hello,

i've got a similar problem:
when i'm type for example *fünf* in the search-form i get :
Die Suche konnte nicht wie gewünscht ausgeführt werden. Hinweis für den Administrator dieses Blogs: Dieser Fehler kann durch fehlende Index-Schlüssel der Datenbank verursacht werden. Auf MySQL-Systemen muss der Datenbankbenutzer-Account in der Lage sein, Index-Schlüssel zu erstellen und folgende Abfrage auszuführen:

CREATE FULLTEXT INDEX entry_idx on serendipity_entries (title,body,extended)

Die genaue Fehlermeldung der Datenbank bei der Suche lautete:

SELECT
e.id,
e.authorid,
a.realname AS author,
e.allow_comments,
e.moderate_comments,
a.email,
e.timestamp,
e.comments,
e.title,
e.body,
e.extended,
e.trackbacks,
e.exflag

FROM
serendipity_entries e
LEFT JOIN serendipity_authors a
ON e.authorid = a.authorid
LEFT JOIN serendipity_entrycat ec
ON e.id = ec.entryid
LEFT OUTER JOIN serendipity_entryproperties ep_cache_extended
ON (e.id = ep_cache_extended.entryid AND ep_cache_extended.property = 'ep_cache_extended')
LEFT OUTER JOIN serendipity_entryproperties ep_cache_body
ON (e.id = ep_cache_body.entryid AND ep_cache_body.property = 'ep_cache_body')
LEFT OUTER JOIN serendipity_entryproperties ep_access
ON (e.id = ep_access.entryid AND ep_access.property = 'ep_access')
LEFT JOIN serendipity_entryproperties ep_sticky
ON (e.id = ep_sticky.entryid AND ep_sticky.property = 'ep_is_sticky') LEFT JOIN serendipity_category c
ON ec.categoryid = c.categoryid LEFT JOIN serendipity_authorgroups AS acl_a
ON acl_a.authorid = 1
LEFT JOIN serendipity_access AS acl_acc
ON ( acl_acc.artifact_mode = 'read'
AND acl_acc.artifact_type = 'category'
AND acl_acc.artifact_id = c.categoryid
)
WHERE
(MATCH(title,body,extended) AGAINST('*fünf*' IN BOOLEAN MODE))
AND isdraft = 'false' AND timestamp <= 1208872500 AND (ep_access.property IS NULL OR ep_access.value = 'member' OR ep_access.value = 'public' OR (ep_access.value = 'private' AND e.authorid = 1)) AND (
c.categoryid IS NULL
OR ( acl_acc.groupid = acl_a.groupid OR acl_acc.groupid = 0)
OR ( acl_acc.artifact_id IS NULL

)
)
GROUP BY e.id
ORDER BY timestamp DESC
LIMIT 15

/ You have an error in your SQL syntax near 'BOOLEAN MODE))
AND isdraft = 'false' AND timestamp' at line 38
so i make :

Code: Select all

CREATE FULLTEXT INDEX entry_idx on serendipity_entries (title,body,extended)
but all i got back is :
SQL-Befehl:

CREATE FULLTEXT INDEX entry_idx ON serendipity_entries(
title,
body,
EXTENDED
)

MySQL meldet: Dokumentation
#1061 - Duplicate key name 'entry_idx'
whats the problem here? anyone got an idea?

Posted: Wed Apr 23, 2008 10:05 am
by garvinhicking
Hi!

Your MySQL version is too old and does not support the "in boolean mode" MySQL syntax. s9y suggests to use at least MySQL 4.0, which is already more than 5 years old - prior versions are not suggestable.

HTH,
Garvin

Posted: Wed Jul 16, 2008 1:39 am
by BenD
I got exact the same problem with CREATE FULLTEXT INDEX.
Now, thats what I do on the mysql console:
****:~# mysql --user=admin --password=***** serendipity
--> full administrative privileges

mysql> GRANT INDEX ON *.* TO *@besuchermag.net;
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.31 sec)

--> Now I try to create the fulltext index on my own by executing "CREATE FULLTEXT INDEX entry_idx on serendipity_entries (title,body,extended)" in PhpMyAdmin with user "serendipity". This fails, giving the error: "#1214 - The used table type doesn't support FULLTEXT indexes "

The same error comes, when I try to execute the command as admin:
mysql> CREATE FULLTEXT INDEX entry_idx on serendipity_entries (title,body,extended);
ERROR 1214 (HY000): The used table type doesn't support FULLTEXT indexes

Now, whats wrong with my table? Could it be, that I have to convert all tables to MyISAM from InnoDB? Why does Serendipity create them nearly all as InnoDB?
Are there any sideeffects?

Image

Posted: Wed Jul 16, 2008 10:32 am
by kleinerChemiker
InnoDB doesn't support FULLTEXT indizes. So yes, you have to convert them. I cannot say why s9y created InnoDB tables, but maybe s9y creates tables in the default format and maybe your default is InnoDB.

Posted: Wed Jul 16, 2008 12:02 pm
by garvinhicking
Hi!

s9y did not create innodb tables. Your mysql setup seems to have defaulted to innodb, or some other mechanism converted it. s9y creates the table without any engine declaration, which should lead to MyISAM in mysql-distributions...


Regards,
Garvin

Posted: Wed Jul 16, 2008 2:53 pm
by BenD
I converted the tables now using the ALTER-function (I know this is not the preferrable method, but I am lazy). The CREATE FULLTEXT INDEX-command now worked and search is working now, too.

Edit: Wouldn't it be nice if Serendipity setup would prescribe MyISAM as Engine, or let the user choose?