<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>闲来无空 &#187; 索引</title>
	<atom:link href="http://www.sogg.name/archives/tag/%e7%b4%a2%e5%bc%95/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sogg.name</link>
	<description>简单生活，简单记录</description>
	<lastBuildDate>Thu, 24 Feb 2011 06:22:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>在Mediawiki中搜索3字单词</title>
		<link>http://www.sogg.name/archives/2008/0130003233.html</link>
		<comments>http://www.sogg.name/archives/2008/0130003233.html#comments</comments>
		<pubDate>Tue, 29 Jan 2008 16:32:33 +0000</pubDate>
		<dc:creator>sogg</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[索引]]></category>
		<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.sogg.name/archives/2008/0130003233.html</guid>
		<description><![CDATA[在MySQL中建立全文索引时，默认只对4个字符以上（包括）的字符串建立索引，也就是说当要在使用MySQL作为数据库引擎的MediaWiki网站中检索三字词时，是得不到结果的，比如试图搜索web。若要对四个字符以下单词建立索引，需要修改MySQL的一个参数：ft_min_word_len，其默认值是4。修改该参数后重启MySQL并重建MediaWiki的索引： REPAIR TABLE searchindex QUICK; 如果使用的数据库是MySQL 3.x 版本，除了修改以上参数外，还需要在MediaWiki的LocalSettings.php中设定$wgDBminWordLen参数，如果是4.x以上版本，则可以忽略此参数： $wgDBminWordLen = 3; 参见： Manual:$wgDBminWordLen Fine-Tuning MySQL Full-Text Search Using System Variables Configure MySQL to include two-letter or three-letter words in search indexing 标签：索引, mediawiki, MySQL 相关日志： mediawiki的上传尺寸警告修改 (0) 挑挑拣拣 (weekly) (0) 为mediawiki用户重置密码 (2)]]></description>
			<content:encoded><![CDATA[<p>在MySQL中建立全文索引时，默认只对4个字符以上（包括）的字符串建立索引，也就是说当要在使用MySQL作为数据库引擎的MediaWiki网站中检索三字词时，是得不到结果的，比如试图搜索web。若要对四个字符以下单词建立索引，需要修改MySQL的一个参数：<code><em><strong>ft_min_word_len</strong></em>，其默认值是4。修改该参数后重启MySQL并重建MediaWiki的索引：</code></p>
<blockquote><p><strong><code>REPAIR TABLE searchindex QUICK;</code></strong></p></blockquote>
<p>如果使用的数据库是MySQL 3.x 版本，除了修改以上参数外，还需要在MediaWiki的LocalSettings.php中设定$wgDBminWordLen参数，如果是4.x以上版本，则可以忽略此参数：</p>
<blockquote><p> <strong>$wgDBminWordLen     = 3;</strong></p></blockquote>
<p>参见：</p>
<ol>
<li><a href="http://www.mediawiki.org/wiki/Manual:$wgDBminWordLen">Manual:$wgDBminWordLen</a></li>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html"> Fine-Tuning MySQL Full-Text Search</a></li>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/using-system-variables.html">Using System Variables</a></li>
<li><a href="http://eventum.mysql.org/wiki/index.php/Fulltext_Search#MySQL_Database_Server">Configure MySQL to include two-letter or three-letter words in search indexing</a></li>
</ol>

	标签：<a href="http://www.sogg.name/archives/tag/%e7%b4%a2%e5%bc%95" title="索引" rel="tag nofollow">索引</a>, <a href="http://www.sogg.name/archives/tag/mediawiki" title="mediawiki" rel="tag nofollow">mediawiki</a>, <a href="http://www.sogg.name/archives/tag/mysql" title="MySQL" rel="tag nofollow">MySQL</a><br />

	<h4>相关日志：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.sogg.name/archives/2007/0611213448.html" title="mediawiki的上传尺寸警告修改 (2007年06月11日)">mediawiki的上传尺寸警告修改</a> (0)</li>
	<li><a href="http://www.sogg.name/archives/2009/0531112830.html" title="挑挑拣拣  (weekly) (2009年05月31日)">挑挑拣拣  (weekly)</a> (0)</li>
	<li><a href="http://www.sogg.name/archives/2008/0117230016.html" title="为mediawiki用户重置密码 (2008年01月17日)">为mediawiki用户重置密码</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.sogg.name/archives/2008/0130003233.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

