[solved] confusing output by search-function

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
CrasherAtWeb
Regular
Posts: 34
Joined: Tue Mar 18, 2008 11:43 am
Location: Bremen, Germany
Contact:

[solved] confusing output by search-function

Post 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).
Last edited by CrasherAtWeb on Sat Mar 29, 2008 3:29 pm, edited 1 time in total.
More Light!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: confusing output by search-function

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
CrasherAtWeb
Regular
Posts: 34
Joined: Tue Mar 18, 2008 11:43 am
Location: Bremen, Germany
Contact:

Post 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...
More Light!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
CrasherAtWeb
Regular
Posts: 34
Joined: Tue Mar 18, 2008 11:43 am
Location: Bremen, Germany
Contact:

Post 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...
More Light!
Post Reply