#1149 search_box with full text is broken

v1.8.4
open
nobody
6
2014-08-26
2004-01-05
Terris Linenbach
No

1.8 rc3 upgraded from 1.7.1.1
windows
iis

Search for "search words". Result:

Warning: error: Can't find FULLTEXT index matching the
column list in query:
SELECT COUNT(*) FROM tiki_pages WHERE 1 AND
MATCH(pageName,data) AGAINST ('search words')
in C:\tikiwiki-1.8.RC3\lib\tikidblib.php on line 125
Values:

$result is false
$result is empty

Discussion

  • Logged In: YES
    user_id=155319

    Here is the fix:

    Alter lib/searchlib.php

    Find:

    'search' => array('pageName', 'data'),

    Replace with:

    'search' => array('pageName', 'description', 'data'),

     
  • Logged In: YES
    user_id=738765

    See ReleaseProcess18, reopen if not working, I don't know
    what's with your fix...is redflo's one the same?

     
    • status: open --> closed-fixed
     
  • Logged In: NO

    The fix for me was to create a second full text index for
    just 'data'. The create table script below creates a full text
    index for data and title.

    CREATE TABLE tiki_blog_posts (
    postId int(8) NOT NULL auto_increment,
    blogId int(8) NOT NULL default '0',
    data text,
    data_size int(11) unsigned NOT NULL default '0',
    created int(14) default NULL,
    user varchar(200) default NULL,
    trackbacks_to text,
    trackbacks_from text,
    title varchar(80) default NULL,
    PRIMARY KEY (postId),
    KEY data (data(255)),
    KEY blogId (blogId),
    KEY created (created),
    FULLTEXT KEY ft (data,title)
    ) TYPE=MyISAM AUTO_INCREMENT=1 ;

    2
    -- C --

     
    • milestone: 356877 --> 383505
    • summary: 1.8 full text search is broken following 1.7 upgrade --> search_box with full text is broken
    • priority: 9 --> 5
    • status: closed-fixed --> open
     
  • Logged In: YES
    user_id=738765

    This was reported fixed by hsaelens with this change :
    search' => array('p.data'),
    to
    'search' => array('p.data','p.title'),
    line 332
    and it works for me. However I red 2 or 3 people saying they
    had 1.8.1 but this bug too.

     
  • Logged In: YES
    user_id=738765

    terris' fix was applied on BRANCH-1-8 by wolff_borg on
    20040109 and went in release 1.8.0. Something else must be
    causing it.
    Reading lib/searchlib.php's log, two commits pretend to fix
    this bug but it seems it still happens.

     
  • Paul Sue
    Paul Sue
    2004-04-11

    Logged In: YES
    user_id=848660

    I'm running 1.8.1 and I get the same problem ...

    Well, I decided to use the search_new module instead.

    With search_new I no longer get any error message .. but
    unfortunately, I also don't get any search results!! Doesn't
    matter if the setting is Entire Site, Wiki pages, blogs,
    etc., I always get 0 results back no matter what I try!

    This is a serious showstopper and I'll have to revert back
    to 1.7.x if this isn't fixed!!

     
  • Paul Sue
    Paul Sue
    2004-04-18

    Logged In: YES
    user_id=848660

    I tested search_new on my friend's 1.8RC3 and it works fine!
    So what has changed from 1.8RC3 to 1.8.1 that causes
    search_new to not work (at least for me). Did something go
    awry in my upgrade from 1.7.1.1 -> 1.7.4 -> 1.8.1 ???

    Augh!!!!!!

     
  • Logged In: NO

    I get a similar error when searching in entire site.
    But it works fine if I select "wiki pages" or any of the
    other options.
    The site runs 1.8.2 and has no blogs and no forum. You can
    try it yourself: www.prowokulta.org

    ----

    Warning: mysql error: Can't find FULLTEXT index matching the
    column list in query:
    SELECT COUNT(*) FROM tiki_blog_posts p LEFT JOIN tiki_blogs
    b ON b.blogId = p.blogId WHERE b.use_find = "y" AND
    MATCH(p.data,p.title) AGAINST ('test')
    in
    /home/prowokulta/prowokulta.org/htdocs/tiki/lib/tikidblib.php
    on line 125
    Values:

    $result is false
    $result is empty

     
  • Kolja Sulimma
    Kolja Sulimma
    2004-06-14

    Logged In: YES
    user_id=737498

    Same error, different line number for 1.8.3
    I had a look at the sourcecode:
    In tiki-searchresults.php if any of the features (like
    blogs) is selected for searching, a check is performed and
    an error message is displayed if the feature is disabled.
    However, if the entire site is to be searched, the method
    find_pages from lib/searchlib.php is called without any checks.
    This method calles find_blogs albeit there are not blogs at
    my site. Find_blogs in turn does not perform any checks at all.

    Warning: mysql error: Can't find FULLTEXT index matching the
    column list in query:
    SELECT COUNT(*) FROM tiki_blog_posts p LEFT JOIN tiki_blogs
    b ON b.blogId = p.blogId WHERE b.use_find = "y" AND
    MATCH(p.data,p.title) AGAINST ('film')
    in
    /home/prowokulta/prowokulta.org/htdocs/tiki/lib/tikidblib.php
    on line 133

    Warning: Invalid argument supplied for foreach() in
    /home/prowokulta/prowokulta.org/htdocs/tiki/lib/tikidblib.php
    on line 143

    Fatal error: Call to a member function on a non-object in
    /home/prowokulta/prowokulta.org/htdocs/tiki/lib/tikidblib.php
    on line 151

     
  • Kolja Sulimma
    Kolja Sulimma
    2004-06-14

    Logged In: YES
    user_id=737498

    THIS BUG IS A SECURITY/PRIVACY RISK!

    Please increase the priority of this bug. (And change the
    group to v1.8.3)

    From looking at the source code it seems likely that a full
    text search can be used to obtain information from the site
    without the proper permissions. When searching the entire
    site no permissions are checked whatsoever.

    In the scenario described below the search will fail, but if
    all features are present the search will return site content
    to anybody.

     
    • milestone: 383505 --> 406228
     
  • Logged In: YES
    user_id=738765

    About sulimma's last comment, the privacy issue is reported
    in multiple different bug reports.

     
  • Kolja Sulimma
    Kolja Sulimma
    2004-08-11

    Logged In: YES
    user_id=737498

    the problem persists in 1.8,4

     
    • milestone: 406228 --> v1.8.4
    • priority: 5 --> 6