Search fatal error


I have my new elg 1.8 site finished more or less, but when i try to use the search i get this error


The used table type doesn't support FULLTEXT indexes

QUERY: SELECT count(DISTINCT as total FROM elgg_annotations a JOIN elgg_metastrings msn ON a.name_id = JOIN elgg_metastrings msv ON a.value_id = JOIN elgg_entities e ON a.entity_guid = e.guid WHERE msn.string IN ('generic_comment', 'group_topic_post') AND ((MATCH (msv.string) AGAINST ('+bollox' IN BOOLEAN MODE))) AND ( (1 = 1) and e.enabled='yes') AND ( (1 = 1) and a.enabled='yes')


Any help would be greatly appreciated





  • ok, so it's a database issue,  so what fields/rows/columns would i have to switch to fulltext and how do i go about doing that?


    thanks in advance

  • Change the storage engine of your elgg_metastrings table from InnoDB to MyISAM. Unfortunately, full-text search is not supported natively with innoDB tables.

    For a better performance, I would say that you can have the following tables still with InnoDB:

    elgg_annotations, elgg_entities, elgg_entity_relationships, elgg_metadata, elgg_users_sessions.

    InnoDB is transaction-safe (= data-integrity) and provides row-locking in contrast to MyISAM, which has only table-locking. InnoDB, however, does not support full-text search.

    I hope this help!




  • I think you may have just saved my bacon dude! i'll let you know how it goes

  • dude you are the man! ok so, if i change

    elgg_annotations, elgg_entities, elgg_entity_relationships, elgg_metadata, elgg_users_sessions.

    to MyISAM also, will such things as blogs show in the search if i search for blogs? i currently search for blogs and i get nothing.  am i right in assuming metastrings = text strings.  like search engine meta tags?


    One last thing if you could please.  how would i stop a user's username showing?  when i search for a user, the user's displayname is shown but with their username above it.


    Thanks again for taking the time


    much appreciated


    kind regards




    ps, i realise this will slow searches down as there will be more data to sift through, i'll fiddle around with it a little to find a happy medium.

  • I would recommend to having first all tables as MyISAM so that full-text search works correctly.  Then you can experiment with changing the storage engine of elgg_annotations, elgg_entities, elgg_entity_relationships, elgg_metadata, elgg_users_sessions tables to InnoDB. Actually, it is more correct to say 'for better scalability' than 'better performance'. You won't notice any difference in performance indeed with this change unless you have many active users on your website (because of row locking instead of table locking).

    elgg_metastrings table stores the metadata of an entity object (e.g. blog, user etc.). For example, tags are stored there.

    As to your last question, how to remove the username from the search results, you can do the following minor code modification (quick n. dirty :-) in <yourdomain>/mod/search/views/default/search/entity.php (line 50):

    $body = "<p class=\"mbn\">$title</p>$description";
    if ($extra_info) {
        $body .= "<p class=\"elgg-subtext\">$extra_info</p>";
    $body .= "<p class=\"elgg-subtext\">$time</p>"; 

    Just delete $title variable!

    You could also write your own plugin to override this view - this is the recommended Elgg way!

    Hope this help!




  • excellent!  that did exactly what i needed it to do; thanks so much for the help and advice, i really appreciate it.  I will do the dirty (trick $body = "<p class=\"mbn\">$title</p>$description";) for getting rid of the usernames for now (i don't really want users finding usernames, after all that is one half of a user's login info' ;).


    Also, one last tiny thing: i've noticed that there's no 'search' button next to the search text box, just a little magnifying glass.  is that supposed to be the search button? also, how can i make the name (displayname) of the person in the search result into a link to thier profile?

    Thanks again for all the help and advice it's appreciated greatly

    kind regards



  • You are right!  I find that usernames shouldn't be shown together with their display names for security reasons.

    In my opinion, this search icon (magnifying glass) should be clickable with regard to better usability. Right now, it is not. User has to press ENTER key.

    You can link the displayname to the profile by doing the following in <yourdomain>/mod/search/views/default/search/entity.php (line 50):


    $description = "<a href=\"$url\">$description</a>";
    $body = "<p class=\"mbn\"></p>$description";    // remove $title!
    if ($extra_info) {
        $body .= "<p class=\"elgg-subtext\">$extra_info</p>";
    $body .= "<p class=\"elgg-subtext\">$time</p>";

    Just add the one line of code above that block we used before.

    Good luck!

  • Dude, you are the man!!!    I can't thank you enough!!!    hopefully i can return the favour one day!!!


    thanks again for your help and advice it is really appreciated


    kind regards



  • You are welcome. Elggers should help each other ... but one beer should be ok :-)