Bug or not? search-function not working

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Lumpy
Regular
Posts: 30
Joined: Sun Jun 18, 2006 4:54 pm

Bug or not? search-function not working

Post by Lumpy »

Hi,

I've just installed Serendipity and added a few entries. Afterwards I just want to try to the search-function but unfortunately the only output is a error message.
Die Suche konnte nicht wie gewünscht ausgeführt werden. Hinweis für den Administrator dieses Blogs: Der 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,
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_no_frontpage
ON (e.id = ep_no_frontpage.entryid AND ep_no_frontpage.property = 'ep_no_frontpage')
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 OUTER JOIN serendipity_entryproperties ep_access_groups
ON (e.id = ep_access_groups.entryid AND ep_access_groups.property = 'ep_access_groups')
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('flat o2'))
AND isdraft = 'false' AND timestamp <= 1150826683 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 (ep_access_groups.property IS NULL OR (ep_access.value = 'member' AND (ep_access_groups.value LIKE '%;3;%'))) AND (ep_no_frontpage.property IS NULL OR ep_no_frontpage.value != 'true') 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

/ Can't find FULLTEXT index matching the column list
Is this a error in general and did I forget something to set up?

Best regards
Lumpy
Lumpy
Regular
Posts: 30
Joined: Sun Jun 18, 2006 4:54 pm

Post by Lumpy »

I did a little step forward. :lol:

I simply created the FULLTEXT INDEX entry_idx manually within phpmyadmin. Now the search-function is working but does not find any results in the entries.

Anybody who knows the reason? ;)


Best regards
Lumpy

EDIT:Again I did a little step forward. Having added a new entry I'm able to use the search function and also get the results expected. But there is still a little problem. If the option »Hide from article overview / frontpage« of the advanced options is ticked then it is also excluded from the search although I'm logged in as administrator.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

The reason would be that your mysql user did not have "CREATE INDEX" privileges when you installed serendipity. :)

About the no frontpage bug: I just fixed this here: http://svn.berlios.de/viewcvs/serendipi ... erties.php

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/
Lumpy
Regular
Posts: 30
Joined: Sun Jun 18, 2006 4:54 pm

Post by Lumpy »

The reason would be that your mysql user did not have "CREATE INDEX" privileges when you installed serendipity. Smile
Are there any other index which should be created?
About the no frontpage bug: I just fixed this here:
...
Thanks for your quick reply. This fixed the problem.

Best regards
Lumpy
mot2001
Regular
Posts: 9
Joined: Wed Sep 27, 2006 11:31 am
Location: Berlin, Germany
Contact:

My PROBLEM is the same Problem - SUCHE not find any results

Post by mot2001 »

Lumpy wrote:I did a little step forward. :lol:

I simply created the FULLTEXT INDEX entry_idx manually within phpmyadmin. Now the search-function is working but does not find any results in the entries.
You know the reason now?
It seems that Garvins Hack maybe is not the reason
Micha
-------
Marx macht mobil bei Arbeit, Sport und Spiel
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

SQL FULLTEXT search doesn't work unless you have a minimum amount of text. Do you have any entries?

In what way exactly is search failling for you?
Judebert
---
Website | Wishlist | PayPal
ihra
Regular
Posts: 26
Joined: Thu Sep 21, 2006 11:15 am

Post by ihra »

Fulltext search requires about 20-50 entries with about 2k total of text to perform search correctly (I did some research while using geeklog/phpnuke long time ago, actual amounts could be changed). MySQL docs give pretty good discussion about subject.
...ihra / ukki / Jussi Josefsson
Post Reply