Page 1 of 1

[solved] confusing output by search-function

Posted: Sat Mar 29, 2008 12:39 pm
by CrasherAtWeb
After I could create a INDEX of my entries in the MySQL-database, finally my search-function works and finds the right entries matching the keywords. But now there is a confusing output at the end of the search-result what I don't know to handle. Can someone help me with that? It comes after the output how much pages and entries the search-result has:
<pre>SELECT s.*, a.realname FROM serendipity_staticpages AS s LEFT OUTER JOIN serendipity_authors AS a ON a.authorid = s.authorid WHERE MATCH(headline,content) AGAINST('garvin') AND s.publishstatus = 1 AND s.pass = '' GROUP BY id ORDER BY timestamp DESC</pre> / Can't find FULLTEXT index matching the column list
If someone wants to see it in the page, you can visit my website at www.crasheratweb.de (it's in german).

Re: confusing output by search-function

Posted: Sat Mar 29, 2008 1:46 pm
by garvinhicking
Hi!

This means that you are also missing a fulltext index on your staticpage tables. You can look up the serendipity_event_staticpag.ephp file and search for 'fulltext' to add them manually yourself.

HTH,
Garvin

Posted: Sat Mar 29, 2008 2:09 pm
by CrasherAtWeb
when I tried to execute

Code: Select all

CREATE {FULLTEXT_MYSQL} INDEX staticentry_idx ON {$serendipity['dbPrefix']}staticpages(
headline,
content
)
in phpMyAdmin
I got the error-message:
#1064 - 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 '{FULLTEXT_MYSQL} INDEX staticentry_idx on {$serendipity['dbPrefix']}staticpages ' at line 1
Im not that pro in using MySQL. Could someone tell me please, what's wrong with my submission? I just copied it out of serendipity_event_staticpage.php...

Posted: Sat Mar 29, 2008 3:21 pm
by garvinhicking
Hi!

You must replace the {...} stuff with valid MySQL, like

Code: Select all

CREATE FULLTEXT INDEX staticentry_idx ON serendipity_staticpages(
headline,
content
)
Regards,
Garvin

Posted: Sat Mar 29, 2008 3:28 pm
by CrasherAtWeb
Oh damn, stupid me... Sorry! Thanks for the help. Now everything works fine. Garvin you're great. It's hard to wait for your book...