Mailing List Archive

search box problem
I have created a MediaWiki site and it really looks good, but
the search button doesn't seem to work: it only works for a very
small set of words, and that quite erratically.

Do I need to set up something, for example, run an index building
script everyday? Or is it that I don't have to do anything normally
but something must have been messed up, for example, by me editing
the sidebar template?

I'm using MediaWiki 1.3.0, PHP 4.3.8, MySQL 3.23.58.
Thanks.

-June
Re: search box problem [ In reply to ]
June Kim wrote:
> I have created a MediaWiki site and it really looks good, but
> the search button doesn't seem to work: it only works for a very
> small set of words, and that quite erratically.
>
> Do I need to set up something, for example, run an index building
> script everyday? Or is it that I don't have to do anything normally
> but something must have been messed up, for example, by me editing
> the sidebar template?
>
> I'm using MediaWiki 1.3.0, PHP 4.3.8, MySQL 3.23.58.

Several things to check:

First, MySQL by default is set to only index words longer than three
letters. Shorter words will just be ignored. If you reconfigure MySQL,
change $wgDBminWordLen in your LocalSettings.php to make sure that
MediaWiki isn't too aggressively filtering out the short words.

Second, MySQL has a fixed stopword list, of common English words that
are unlikely to provide useful results in a search.
includes/FulltextStoplist.php contains a copy of this list to filter out
those words prior to searching to avoid blanking the entire result set
when searching multiple words. (This is for the MySQL 3 mode.)

Third, if your database is very small or new the index might just not be
big enough to return accurate results. Words present in 50% of the
entries will be ignored.

Finally, certain kinds of errors might be causing PHP to crap out after
saving the page but before running the link and search index updates.
Check your PHP error log.

Try taking a look at the 'searchindex' table, see if it contains the
entries you're looking for. Try running maintenance/rebuildtextindex.php
to rebuild all entries.

-- brion vibber (brion @ pobox.com)
Re: search box problem [ In reply to ]
Brion Vibber wrote:
> June Kim wrote:
>
>> I have created a MediaWiki site and it really looks good, but
>> the search button doesn't seem to work: it only works for a very
>> small set of words, and that quite erratically.
>>
>> Do I need to set up something, for example, run an index building
>> script everyday? Or is it that I don't have to do anything normally
>> but something must have been messed up, for example, by me editing
>> the sidebar template?
>>
>> I'm using MediaWiki 1.3.0, PHP 4.3.8, MySQL 3.23.58.
>
>
> Several things to check:
>
> First, MySQL by default is set to only index words longer than three
> letters. Shorter words will just be ignored. If you reconfigure MySQL,
> change $wgDBminWordLen in your LocalSettings.php to make sure that
> MediaWiki isn't too aggressively filtering out the short words.
>
> Second, MySQL has a fixed stopword list, of common English words that
> are unlikely to provide useful results in a search.
> includes/FulltextStoplist.php contains a copy of this list to filter out
> those words prior to searching to avoid blanking the entire result set
> when searching multiple words. (This is for the MySQL 3 mode.)
>
> Third, if your database is very small or new the index might just not be
> big enough to return accurate results. Words present in 50% of the
> entries will be ignored.
>
> Finally, certain kinds of errors might be causing PHP to crap out after
> saving the page but before running the link and search index updates.
> Check your PHP error log.
>
> Try taking a look at the 'searchindex' table, see if it contains the
> entries you're looking for. Try running maintenance/rebuildtextindex.php
> to rebuild all entries.
>
> -- brion vibber (brion @ pobox.com)
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l@Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l

It turned out that the scripts were somehow inconsistent with each
other, causing undefined function problems. I've upgraded to
the latest and the problem went away.

Thank you so much for your help. All was valuable information for me.

-June