欢迎光临
我们一直在努力

安装/配置sphinx

1、安装sphinx

安装sphinx-3.1.1很简单,直接下载、解压即可

<span class="com">#下载地址:http://sphinxsearch.com/downloads/current/</span>
<span class="com">#http://sphinxsearch.com/files/sphinx-3.1.1-612d99f-linux-amd64.tar.gz</span><span class="pln">
wget http</span><span class="pun">:</span><span class="com">//sphinxsearch.com/files/sphinx-3.1.1-612d99f-linux-amd64.tar.gz</span><span class="pln">
tar zxf sphinx</span><span class="pun">-</span><span class="lit">3.1</span><span class="pun">.</span><span class="lit">1</span><span class="pun">-</span><span class="lit">612d99f</span><span class="pun">-</span><span class="pln">linux</span><span class="pun">-</span><span class="pln">amd64</span><span class="pun">.</span><span class="pln">tar</span><span class="pun">.</span><span class="pln">gz
mv sphinx</span><span class="pun">-</span><span class="lit">3.1</span><span class="pun">.</span><span class="lit">1</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">-</span><span class="lit">3.1</span><span class="pun">.</span><span class="lit">1</span><span class="pln">
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">-</span><span class="lit">3.1</span><span class="pun">.</span><span class="lit">1</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">bin</span><span class="pun">/</span><span class="pln">indexer </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">bin</span><span class="pun">/.</span><span class="pln">
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">bin</span><span class="pun">/</span><span class="pln">searchd </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">bin</span><span class="pun">/.</span><span class="pln">
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">bin</span><span class="pun">/</span><span class="pln">wordbreaker </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">bin</span><span class="pun">/.</span><span class="pln">
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">bin</span><span class="pun">/</span><span class="pln">indextool </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">bin</span><span class="pun">/.</span>
<span class="com">#解决centos7 mysql不能读取:</span><span class="pln">
sudo yum install mysql</span><span class="pun">-</span><span class="pln">devel 
sudo ln </span><span class="pun">-</span><span class="pln">s </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib64</span><span class="pun">/</span><span class="pln">mysql</span><span class="pun">/</span><span class="pln">libmysqlclient</span><span class="pun">.</span><span class="pln">so </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib64</span><span class="pun">/</span><span class="pln">
sudo ln </span><span class="pun">-</span><span class="pln">s </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib64</span><span class="pun">/</span><span class="pln">mysql</span><span class="pun">/</span><span class="pln">libmysqlclient</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">18</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib64</span><span class="pun">/</span>

2、启动sphinx(配置文件附录)

<span class="pun">启动服务:</span><span class="pln">
searchd </span><span class="pun">-</span><span class="pln">c </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">.</span><span class="pln">conf
</span><span class="pun">建立索引:</span><span class="pln">
indexer </span><span class="pun">-</span><span class="pln">c </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">.</span><span class="pln">conf </span><span class="pun">--</span><span class="pln">all
</span><span class="pun">停止服务:</span><span class="pln">
searchd </span><span class="pun">--</span><span class="pln">stop
</span><span class="pun">增量索引:</span><span class="pln">
indexer </span><span class="pun">-</span><span class="pln">c </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">.</span><span class="pln">conf </span><span class="pun">--</span><span class="pln">rotate delta 
</span><span class="pun">合并索引:</span><span class="pln">
indexer </span><span class="pun">-</span><span class="pln">c </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">.</span><span class="pln">conf </span><span class="pun">--</span><span class="pln">rotate </span><span class="pun">--</span><span class="pln">merge main delta 

</span><span class="pun">更新单个索引:</span><span class="pln">
indexer </span><span class="pun">-</span><span class="pln">c </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">.</span><span class="pln">conf </span><span class="pun">--</span><span class="pln">rotate cmstop_video</span>

3、配置增量

<span class="pln">vim </span><span class="pun">/</span><span class="pln">data</span><span class="pun">/</span><span class="pln">sh</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">.</span><span class="pln">sh
</span><span class="com">//脚本开始</span>
<span class="com">#/bin/bash</span><span class="pln">
indexer </span><span class="pun">-</span><span class="pln">c </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">.</span><span class="pln">conf </span><span class="pun">--</span><span class="pln">rotate hospital_delta test1_delta cmstop_content_delta cmstop_video_delta cmstop_article_delta cmstop_space_delta
indexer </span><span class="pun">-</span><span class="pln">c </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">.</span><span class="pln">conf </span><span class="pun">--</span><span class="pln">merge cmstop_video cmstop_video_delta </span><span class="pun">--</span><span class="pln">rotate
indexer </span><span class="pun">-</span><span class="pln">c </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">.</span><span class="pln">conf </span><span class="pun">--</span><span class="pln">merge cmstop_content cmstop_content_delta </span><span class="pun">--</span><span class="pln">rotate
indexer </span><span class="pun">-</span><span class="pln">c </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">.</span><span class="pln">conf </span><span class="pun">--</span><span class="pln">merge test1 test1_delta </span><span class="pun">--</span><span class="pln">rotate
indexer </span><span class="pun">-</span><span class="pln">c </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">.</span><span class="pln">conf </span><span class="pun">--</span><span class="pln">merge hospital hospital_delta </span><span class="pun">--</span><span class="pln">rotate
indexer </span><span class="pun">-</span><span class="pln">c </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">.</span><span class="pln">conf </span><span class="pun">--</span><span class="pln">merge cmstop_space cmstop_space_delta </span><span class="pun">--</span><span class="pln">rotate
indexer </span><span class="pun">-</span><span class="pln">c </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">.</span><span class="pln">conf </span><span class="pun">--</span><span class="pln">merge cmstop_article cmstop_article_delta </span><span class="pun">--</span><span class="pln">rotate
</span><span class="com">//脚本结束</span><span class="pln">
chmod a</span><span class="pun">+</span><span class="pln">x </span><span class="pun">/</span><span class="pln">data</span><span class="pun">/</span><span class="pln">sh</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">.</span><span class="pln">sh
crontab </span><span class="pun">-</span><span class="pln">e
</span><span class="pun">*</span><span class="str">/10 * * * * /</span><span class="pln">data</span><span class="pun">/</span><span class="pln">sh</span><span class="pun">/</span><span class="pln">sphinx</span><span class="pun">.</span><span class="pln">sh</span>

附录:

<span class="com">#</span>
<span class="com"># Minimal Sphinx configuration sample (clean, simple, functional)</span>
<span class="com">#</span>


<span class="com">#问答数据源+索引</span><span class="pln">
source src1
</span><span class="pun">{</span><span class="pln">
	type			</span><span class="pun">=</span><span class="pln"> mysql
	sql_host		</span><span class="pun">=</span> <span class="lit">127.0</span><span class="pun">.</span><span class="lit">0.1</span><span class="pln">
	sql_user		</span><span class="pun">=</span><span class="pln"> db_user
	sql_pass		</span><span class="pun">=</span><span class="pln"> db_password
	sql_db			</span><span class="pun">=</span><span class="pln"> db_name
	sql_port		</span><span class="pun">=</span> <span class="lit">3306</span>	<span class="com"># optional, default is 3306</span><span class="pln">

	sql_query_pre   </span><span class="pun">=</span><span class="pln"> SET NAMES utf8 
	sql_query_pre   </span><span class="pun">=</span><span class="pln"> replace </span><span class="kwd">into</span><span class="pln"> newvodjk_sphinx_counter </span><span class="kwd">select</span> <span class="lit">1</span><span class="pun">,</span><span class="pln">max</span><span class="pun">(</span><span class="pln">id</span><span class="pun">)</span> <span class="kwd">from</span><span class="pln"> newvodjk_ask
	sql_query		</span><span class="pun">=</span><span class="pln"> SELECT id</span><span class="pun">,</span><span class="pln"> title</span><span class="pun">,</span> <span class="str">`desc`</span><span class="pun">,</span><span class="pln"> tags FROM newvodjk_ask WHERE isverify </span><span class="pun">=</span> <span class="lit">1</span><span class="pln"> AND id </span><span class="pun"><=</span> <span class="pun">(</span><span class="kwd">select</span><span class="pln"> max_doc_id </span><span class="kwd">from</span><span class="pln"> newvodjk_sphinx_counter </span><span class="kwd">where</span><span class="pln"> counter_id </span><span class="pun">=</span> <span class="lit">1</span><span class="pun">)</span>
	<span class="com">#sql_attr_uint		= id</span>
	<span class="com">#sql_attr_timestamp	= date_added</span>
<span class="pun">}</span><span class="pln">


index test1
</span><span class="pun">{</span><span class="pln">
	source			</span><span class="pun">=</span><span class="pln"> src1
	path			</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">data</span><span class="pun">/</span><span class="pln">test1
	</span><span class="com"># 设置中文匹配</span><span class="pln">
	min_word_len    </span><span class="pun">=</span> <span class="lit">1</span>
	<span class="com"># 指定字符集(已废弃)</span>
	<span class="com">#charset_type    = utf-8</span>
	<span class="com"># 指定utf-8的编码表</span><span class="pln">
	charset_table   </span><span class="pun">=</span> <span class="lit">0.</span><span class="pun">.</span><span class="lit">9</span><span class="pun">,</span><span class="pln"> A</span><span class="pun">..</span><span class="pln">Z</span><span class="pun">-></span><span class="pln">a</span><span class="pun">..</span><span class="pln">z</span><span class="pun">,</span><span class="pln"> _</span><span class="pun">,</span><span class="pln"> a</span><span class="pun">..</span><span class="pln">z</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">410.</span><span class="pun">.</span><span class="pln">U</span><span class="pun">+</span><span class="lit">42F</span><span class="pun">-></span><span class="pln">U</span><span class="pun">+</span><span class="lit">430.</span><span class="pun">.</span><span class="pln">U</span><span class="pun">+</span><span class="lit">44F</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">430.</span><span class="pun">.</span><span class="pln">U</span><span class="pun">+</span><span class="lit">44F</span><span class="pln">

	min_prefix_len </span><span class="pun">=</span> <span class="lit">0</span><span class="pln">
	min_infix_len </span><span class="pun">=</span> <span class="lit">2</span>

	<span class="com"># 开启中文分词支持</span><span class="pln">
	ngram_len </span><span class="pun">=</span> <span class="lit">1</span>
	<span class="com"># 需要分词的字符</span><span class="pln">
	ngram_chars </span><span class="pun">=</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">4E00</span><span class="pun">..</span><span class="pln">U</span><span class="pun">+</span><span class="lit">9FBB</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3400.</span><span class="pun">.</span><span class="pln">U</span><span class="pun">+</span><span class="lit">4DB5</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">20000.</span><span class="pun">.</span><span class="pln">U</span><span class="pun">+</span><span class="lit">2A6D6</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="pln">FA0E</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="pln">FA0F</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="pln">FA11</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="pln">FA13</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="pln">FA14</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="pln">FA1F</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="pln">FA21</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="pln">FA23</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="pln">FA24</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="pln">FA27</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="pln">FA28</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="pln">FA29</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3105.</span><span class="pun">.</span><span class="pln">U</span><span class="pun">+</span><span class="lit">312C</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31A0.</span><span class="pun">.</span><span class="pln">U</span><span class="pun">+</span><span class="lit">31B7</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3041</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3043</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3045</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3047</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3049</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">304B</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">304D</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">304F</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3051</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3053</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3055</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3057</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3059</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">305B</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">305D</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">305F</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3061</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3063</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3066</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3068</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">306A</span><span class="pun">..</span><span class="pln">U</span><span class="pun">+</span><span class="lit">306F</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3072</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3075</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3078</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">307B</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">307E</span><span class="pun">..</span><span class="pln">U</span><span class="pun">+</span><span class="lit">3083</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3085</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3087</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3089.</span><span class="pun">.</span><span class="pln">U</span><span class="pun">+</span><span class="lit">308E</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">3090.</span><span class="pun">.</span><span class="pln">U</span><span class="pun">+</span><span class="lit">3093</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30A1</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30A3</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30A5</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30A7</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30A9</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30AD</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30AF</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30B3</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30B5</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30BB</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30BD</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30BF</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30C1</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30C3</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30C4</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30C6</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30CA</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30CB</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30CD</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30CE</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30DE</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30DF</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30E1</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30E2</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30E3</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30E5</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30E7</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30EE</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30F0.</span><span class="pun">.</span><span class="pln">U</span><span class="pun">+</span><span class="lit">30F3</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30F5</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">30F6</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31F0</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31F1</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31F2</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31F3</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31F4</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31F5</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31F6</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31F7</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31F8</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31F9</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31FA</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31FB</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31FC</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31FD</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31FE</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">31FF</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="pln">AC00</span><span class="pun">..</span><span class="pln">U</span><span class="pun">+</span><span class="pln">D7A3</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">1100.</span><span class="pun">.</span><span class="pln">U</span><span class="pun">+</span><span class="lit">1159</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">1161.</span><span class="pun">.</span><span class="pln">U</span><span class="pun">+</span><span class="lit">11A2</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="lit">11A8.</span><span class="pun">.</span><span class="pln">U</span><span class="pun">+</span><span class="lit">11F9</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="pln">A000</span><span class="pun">..</span><span class="pln">U</span><span class="pun">+</span><span class="pln">A48C</span><span class="pun">,</span><span class="pln"> U</span><span class="pun">+</span><span class="pln">A492</span><span class="pun">..</span><span class="pln">U</span><span class="pun">+</span><span class="pln">A4C6
</span><span class="pun">}</span>


<span class="com">#增量问答</span><span class="pln">
source test1_delta_src</span><span class="pun">:</span><span class="pln">src1
</span><span class="pun">{</span><span class="pln">
    sql_range_step                </span><span class="pun">=</span> <span class="lit">10000</span>
     <span class="com">#增量索引只查询新增的数据</span><span class="pln">
    sql_query   </span><span class="pun">=</span><span class="pln"> SELECT id</span><span class="pun">,</span><span class="pln"> title</span><span class="pun">,</span> <span class="str">`desc`</span><span class="pun">,</span><span class="pln"> tags FROM newvodjk_ask WHERE isverify </span><span class="pun">=</span> <span class="lit">1</span><span class="pln"> AND id </span><span class="pun">>=</span> <span class="pun">(</span><span class="kwd">select</span><span class="pln"> max_doc_id </span><span class="kwd">from</span><span class="pln"> newvodjk_sphinx_counter </span><span class="kwd">where</span><span class="pln"> counter_id </span><span class="pun">=</span> <span class="lit">1</span><span class="pun">)</span>

<span class="pun">}</span><span class="pln">

index test1_delta</span><span class="pun">:</span><span class="pln">test1
</span><span class="pun">{</span><span class="pln">
	source			</span><span class="pun">=</span><span class="pln"> test1_delta_src
	path			</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">data</span><span class="pun">/</span><span class="pln">test1_delta
</span><span class="pun">}</span>


<span class="com">#医院</span><span class="pln">
source hospital_src
</span><span class="pun">{</span><span class="pln">
	type			</span><span class="pun">=</span><span class="pln"> mysql
	sql_host		</span><span class="pun">=</span> <span class="lit">127.0</span><span class="pun">.</span><span class="lit">0.1</span><span class="pln">
	sql_user		</span><span class="pun">=</span><span class="pln"> db_user
	sql_pass		</span><span class="pun">=</span><span class="pln"> db_password
	sql_db			</span><span class="pun">=</span><span class="pln"> db_name
	sql_port		</span><span class="pun">=</span> <span class="lit">3306</span>	<span class="com"># optional, default is 3306</span><span class="pln">

	sql_query_pre   </span><span class="pun">=</span><span class="pln"> SET NAMES utf8 
	sql_query_pre   </span><span class="pun">=</span><span class="pln"> replace </span><span class="kwd">into</span><span class="pln"> newvodjk_sphinx_counter </span><span class="kwd">select</span> <span class="lit">2</span><span class="pun">,</span><span class="pln">max</span><span class="pun">(</span><span class="pln">id</span><span class="pun">)</span> <span class="kwd">from</span><span class="pln"> newvodjk_hospital
	sql_query		</span><span class="pun">=</span><span class="pln"> SELECT id</span><span class="pun">,</span><span class="pln"> hos_name FROM newvodjk_hospital WHERE id </span><span class="pun"><=</span> <span class="pun">(</span><span class="kwd">select</span><span class="pln"> max_doc_id </span><span class="kwd">from</span><span class="pln"> newvodjk_sphinx_counter </span><span class="kwd">where</span><span class="pln"> counter_id </span><span class="pun">=</span> <span class="lit">2</span><span class="pun">)</span>
	<span class="com">#sql_attr_uint		= id</span>
	<span class="com">#sql_attr_timestamp	= date_added</span>
<span class="pun">}</span><span class="pln">

index hospital</span><span class="pun">:</span><span class="pln">test1
</span><span class="pun">{</span><span class="pln">
	source			</span><span class="pun">=</span><span class="pln"> hospital_src
	path			</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">data</span><span class="pun">/</span><span class="pln">hospital
</span><span class="pun">}</span>


<span class="com">#增量医院</span><span class="pln">
source hospital_delta_src</span><span class="pun">:</span><span class="pln">hospital_src
</span><span class="pun">{</span><span class="pln">
    sql_range_step                </span><span class="pun">=</span> <span class="lit">10000</span>
     <span class="com">#增量索引只查询新增的数据</span><span class="pln">
    sql_query		</span><span class="pun">=</span><span class="pln"> SELECT id</span><span class="pun">,</span><span class="pln"> hos_name FROM newvodjk_hospital WHERE id </span><span class="pun">>=</span> <span class="pun">(</span><span class="kwd">select</span><span class="pln"> max_doc_id </span><span class="kwd">from</span><span class="pln"> newvodjk_sphinx_counter </span><span class="kwd">where</span><span class="pln"> counter_id </span><span class="pun">=</span> <span class="lit">2</span><span class="pun">)</span>
	
<span class="pun">}</span><span class="pln">

index hospital_delta</span><span class="pun">:</span><span class="pln">hospital
</span><span class="pun">{</span><span class="pln">
	source			</span><span class="pun">=</span><span class="pln"> hospital_delta_src
	path			</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">data</span><span class="pun">/</span><span class="pln">hospital_delta
</span><span class="pun">}</span>


<span class="com">#综合</span><span class="pln">
source cmstop_content_src
</span><span class="pun">{</span><span class="pln">
	type			</span><span class="pun">=</span><span class="pln"> mysql

	sql_host		</span><span class="pun">=</span> <span class="lit">127.0</span><span class="pun">.</span><span class="lit">0.1</span><span class="pln">
	sql_user		</span><span class="pun">=</span><span class="pln"> db_user
	sql_pass		</span><span class="pun">=</span><span class="pln"> db_password
	sql_db			</span><span class="pun">=</span><span class="pln"> db_name
	sql_port		</span><span class="pun">=</span> <span class="lit">3306</span>	<span class="com"># optional, default is 3306</span><span class="pln">

	sql_query_pre   </span><span class="pun">=</span><span class="pln"> SET NAMES utf8 
	sql_query_pre   </span><span class="pun">=</span><span class="pln"> replace </span><span class="kwd">into</span><span class="pln"> cmstop_sphinx_counter </span><span class="kwd">select</span> <span class="lit">1</span><span class="pun">,</span><span class="pln">max</span><span class="pun">(</span><span class="pln">contentid</span><span class="pun">)</span> <span class="kwd">from</span><span class="pln"> cmstop_content
	sql_query		</span><span class="pun">=</span><span class="pln"> SELECT contentid</span><span class="pun">,</span><span class="pln"> title</span><span class="pun">,</span><span class="pln"> tags FROM cmstop_content WHERE contentid </span><span class="pun"><=</span> <span class="pun">(</span><span class="kwd">select</span><span class="pln"> max_doc_id </span><span class="kwd">from</span><span class="pln"> cmstop_sphinx_counter </span><span class="kwd">where</span><span class="pln"> counter_id </span><span class="pun">=</span> <span class="lit">1</span><span class="pun">)</span>
	<span class="com">#sql_attr_uint		= id</span>
	<span class="com">#sql_attr_timestamp	= date_added</span>
<span class="pun">}</span><span class="pln">

index cmstop_content</span><span class="pun">:</span><span class="pln">test1
</span><span class="pun">{</span><span class="pln">
	source			</span><span class="pun">=</span><span class="pln"> cmstop_content_src
	path			</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">data</span><span class="pun">/</span><span class="pln">cmstop_content
</span><span class="pun">}</span>


<span class="com">#增量综合</span><span class="pln">
source cmstop_content_delta_src</span><span class="pun">:</span><span class="pln">cmstop_content_src
</span><span class="pun">{</span><span class="pln">
    sql_range_step                </span><span class="pun">=</span> <span class="lit">10000</span>
     <span class="com">#增量索引只查询新增的数据</span><span class="pln">
    sql_query   </span><span class="pun">=</span><span class="pln"> SELECT contentid</span><span class="pun">,</span><span class="pln"> title</span><span class="pun">,</span><span class="pln"> tags FROM cmstop_content WHERE contentid </span><span class="pun">>=</span> <span class="pun">(</span><span class="kwd">select</span><span class="pln"> max_doc_id </span><span class="kwd">from</span><span class="pln"> cmstop_sphinx_counter </span><span class="kwd">where</span><span class="pln"> counter_id </span><span class="pun">=</span> <span class="lit">1</span><span class="pun">)</span>
<span class="pun">}</span><span class="pln">

index cmstop_content_delta</span><span class="pun">:</span><span class="pln">cmstop_content
</span><span class="pun">{</span><span class="pln">
	source			</span><span class="pun">=</span><span class="pln"> cmstop_content_delta_src
	path			</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">data</span><span class="pun">/</span><span class="pln">cmstop_content_delta
</span><span class="pun">}</span>



<span class="com">#视频</span><span class="pln">
source cmstop_video_src
</span><span class="pun">{</span><span class="pln">
	type			</span><span class="pun">=</span><span class="pln"> mysql

	sql_host		</span><span class="pun">=</span> <span class="lit">127.0</span><span class="pun">.</span><span class="lit">0.1</span><span class="pln">
	sql_user		</span><span class="pun">=</span><span class="pln"> db_user
	sql_pass		</span><span class="pun">=</span><span class="pln"> db_password
	sql_db			</span><span class="pun">=</span><span class="pln"> db_name
	sql_port		</span><span class="pun">=</span> <span class="lit">3306</span>	<span class="com"># optional, default is 3306</span><span class="pln">

	sql_query_pre   </span><span class="pun">=</span><span class="pln"> SET NAMES utf8 
	sql_query_pre   </span><span class="pun">=</span><span class="pln"> replace </span><span class="kwd">into</span><span class="pln"> cmstop_sphinx_counter </span><span class="kwd">select</span> <span class="lit">2</span><span class="pun">,</span><span class="pln">max</span><span class="pun">(</span><span class="pln">contentid</span><span class="pun">)</span> <span class="kwd">from</span><span class="pln"> cmstop_content
	sql_query		</span><span class="pun">=</span><span class="pln"> SELECT contentid</span><span class="pun">,</span><span class="pln"> title</span><span class="pun">,</span><span class="pln"> tags FROM cmstop_content WHERE modelid </span><span class="pun">=</span> <span class="lit">4</span><span class="pln"> AND contentid </span><span class="pun"><=</span> <span class="pun">(</span><span class="kwd">select</span><span class="pln"> max_doc_id </span><span class="kwd">from</span><span class="pln"> cmstop_sphinx_counter </span><span class="kwd">where</span><span class="pln"> counter_id </span><span class="pun">=</span> <span class="lit">2</span><span class="pun">)</span>
	<span class="com">#sql_attr_uint		= id</span>
	<span class="com">#sql_attr_timestamp	= date_added</span>
<span class="pun">}</span><span class="pln">

index cmstop_video</span><span class="pun">:</span><span class="pln">test1
</span><span class="pun">{</span><span class="pln">
	source			</span><span class="pun">=</span><span class="pln"> cmstop_video_src
	path			</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">data</span><span class="pun">/</span><span class="pln">cmstop_video
</span><span class="pun">}</span>


<span class="com">#增量视频</span><span class="pln">
source cmstop_video_delta_src</span><span class="pun">:</span><span class="pln">cmstop_video_src
</span><span class="pun">{</span><span class="pln">
    sql_range_step                </span><span class="pun">=</span> <span class="lit">10000</span>
     <span class="com">#增量索引只查询新增的数据</span><span class="pln">
    sql_query		</span><span class="pun">=</span><span class="pln"> SELECT contentid</span><span class="pun">,</span><span class="pln"> title</span><span class="pun">,</span><span class="pln"> tags FROM cmstop_content WHERE modelid </span><span class="pun">=</span> <span class="lit">4</span><span class="pln"> AND contentid </span><span class="pun">>=</span> <span class="pun">(</span><span class="kwd">select</span><span class="pln"> max_doc_id </span><span class="kwd">from</span><span class="pln"> cmstop_sphinx_counter </span><span class="kwd">where</span><span class="pln"> counter_id </span><span class="pun">=</span> <span class="lit">2</span><span class="pun">)</span>
<span class="pun">}</span><span class="pln">

index cmstop_video_delta</span><span class="pun">:</span><span class="pln">cmstop_content
</span><span class="pun">{</span><span class="pln">
	source			</span><span class="pun">=</span><span class="pln"> cmstop_video_delta_src
	path			</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">data</span><span class="pun">/</span><span class="pln">cmstop_video_delta
</span><span class="pun">}</span>


<span class="com">#文章</span><span class="pln">
source cmstop_article_src
</span><span class="pun">{</span><span class="pln">
	type			</span><span class="pun">=</span><span class="pln"> mysql

	sql_host		</span><span class="pun">=</span> <span class="lit">127.0</span><span class="pun">.</span><span class="lit">0.1</span><span class="pln">
	sql_user		</span><span class="pun">=</span><span class="pln"> db_user
	sql_pass		</span><span class="pun">=</span><span class="pln"> db_password
	sql_db			</span><span class="pun">=</span><span class="pln"> db_name
	sql_port		</span><span class="pun">=</span> <span class="lit">3306</span>	<span class="com"># optional, default is 3306</span><span class="pln">

	sql_query_pre   </span><span class="pun">=</span><span class="pln"> SET NAMES utf8 
	sql_query_pre   </span><span class="pun">=</span><span class="pln"> replace </span><span class="kwd">into</span><span class="pln"> cmstop_sphinx_counter </span><span class="kwd">select</span> <span class="lit">3</span><span class="pun">,</span><span class="pln">max</span><span class="pun">(</span><span class="pln">contentid</span><span class="pun">)</span> <span class="kwd">from</span><span class="pln"> cmstop_content
	sql_query		</span><span class="pun">=</span><span class="pln"> SELECT contentid</span><span class="pun">,</span><span class="pln"> title</span><span class="pun">,</span><span class="pln"> tags FROM cmstop_content WHERE modelid </span><span class="pun">=</span> <span class="lit">1</span><span class="pln"> AND contentid </span><span class="pun"><=</span> <span class="pun">(</span><span class="kwd">select</span><span class="pln"> max_doc_id </span><span class="kwd">from</span><span class="pln"> cmstop_sphinx_counter </span><span class="kwd">where</span><span class="pln"> counter_id </span><span class="pun">=</span> <span class="lit">3</span><span class="pun">)</span>
	<span class="com">#sql_attr_uint		= id</span>
	<span class="com">#sql_attr_timestamp	= date_added</span>
<span class="pun">}</span><span class="pln">

index cmstop_article</span><span class="pun">:</span><span class="pln">test1
</span><span class="pun">{</span><span class="pln">
	source			</span><span class="pun">=</span><span class="pln"> cmstop_article_src
	path			</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">data</span><span class="pun">/</span><span class="pln">cmstop_article
</span><span class="pun">}</span>


<span class="com">#增量文章</span><span class="pln">
source cmstop_article_delta_src</span><span class="pun">:</span><span class="pln">cmstop_article_src
</span><span class="pun">{</span><span class="pln">
    sql_range_step                </span><span class="pun">=</span> <span class="lit">10000</span>
     <span class="com">#增量索引只查询新增的数据</span><span class="pln">
    sql_query		</span><span class="pun">=</span><span class="pln"> SELECT contentid</span><span class="pun">,</span><span class="pln"> title</span><span class="pun">,</span><span class="pln"> tags FROM cmstop_content WHERE modelid </span><span class="pun">=</span> <span class="lit">1</span><span class="pln"> AND contentid </span><span class="pun">>=</span> <span class="pun">(</span><span class="kwd">select</span><span class="pln"> max_doc_id </span><span class="kwd">from</span><span class="pln"> cmstop_sphinx_counter </span><span class="kwd">where</span><span class="pln"> counter_id </span><span class="pun">=</span> <span class="lit">3</span><span class="pun">)</span>
<span class="pun">}</span><span class="pln">

index cmstop_article_delta</span><span class="pun">:</span><span class="pln">cmstop_article
</span><span class="pun">{</span><span class="pln">
	source			</span><span class="pun">=</span><span class="pln"> cmstop_video_delta_src
	path			</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">data</span><span class="pun">/</span><span class="pln">cmstop_article_delta
</span><span class="pun">}</span>



<span class="com">#专家</span><span class="pln">
source cmstop_space_src
</span><span class="pun">{</span><span class="pln">
	type			</span><span class="pun">=</span><span class="pln"> mysql

	sql_host		</span><span class="pun">=</span> <span class="lit">127.0</span><span class="pun">.</span><span class="lit">0.1</span><span class="pln">
	sql_user		</span><span class="pun">=</span><span class="pln"> db_user
	sql_pass		</span><span class="pun">=</span><span class="pln"> db_password
	sql_db			</span><span class="pun">=</span><span class="pln"> db_name
	sql_port		</span><span class="pun">=</span> <span class="lit">3306</span>	<span class="com"># optional, default is 3306</span><span class="pln">

	sql_query_pre   </span><span class="pun">=</span><span class="pln"> SET NAMES utf8 
	sql_query_pre   </span><span class="pun">=</span><span class="pln"> replace </span><span class="kwd">into</span><span class="pln"> cmstop_sphinx_counter </span><span class="kwd">select</span> <span class="lit">4</span><span class="pun">,</span><span class="pln">max</span><span class="pun">(</span><span class="pln">spaceid</span><span class="pun">)</span> <span class="kwd">from</span><span class="pln"> cmstop_content
	sql_query		</span><span class="pun">=</span><span class="pln"> SELECT spaceid</span><span class="pun">,</span><span class="pln"> name FROM cmstop_space WHERE spaceid </span><span class="pun"><=</span> <span class="pun">(</span><span class="kwd">select</span><span class="pln"> max_doc_id </span><span class="kwd">from</span><span class="pln"> cmstop_sphinx_counter </span><span class="kwd">where</span><span class="pln"> counter_id </span><span class="pun">=</span> <span class="lit">4</span><span class="pun">)</span>
	<span class="com">#sql_attr_uint		= id</span>
	<span class="com">#sql_attr_timestamp	= date_added</span>
<span class="pun">}</span><span class="pln">

index cmstop_space</span><span class="pun">:</span><span class="pln">test1
</span><span class="pun">{</span><span class="pln">
	source			</span><span class="pun">=</span><span class="pln"> cmstop_space_src
	path			</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">data</span><span class="pun">/</span><span class="pln">cmstop_space
</span><span class="pun">}</span>



<span class="com">#增量专家</span><span class="pln">
source cmstop_space_delta_src</span><span class="pun">:</span><span class="pln">cmstop_space_src
</span><span class="pun">{</span><span class="pln">
    sql_range_step                </span><span class="pun">=</span> <span class="lit">10000</span>
     <span class="com">#增量索引只查询新增的数据</span><span class="pln">
    sql_query		</span><span class="pun">=</span><span class="pln"> SELECT spaceid</span><span class="pun">,</span><span class="pln"> name FROM cmstop_space WHERE spaceid </span><span class="pun">>=</span> <span class="pun">(</span><span class="kwd">select</span><span class="pln"> max_doc_id </span><span class="kwd">from</span><span class="pln"> cmstop_sphinx_counter </span><span class="kwd">where</span><span class="pln"> counter_id </span><span class="pun">=</span> <span class="lit">4</span><span class="pun">)</span>
<span class="pun">}</span><span class="pln">

index cmstop_space_delta</span><span class="pun">:</span><span class="pln">cmstop_space
</span><span class="pun">{</span><span class="pln">
	source			</span><span class="pun">=</span><span class="pln"> cmstop_space_delta_src
	path			</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">data</span><span class="pun">/</span><span class="pln">cmstop_space_delta
</span><span class="pun">}</span><span class="pln">


index testrt
</span><span class="pun">{</span><span class="pln">
	type			</span><span class="pun">=</span><span class="pln"> rt
	rt_mem_limit		</span><span class="pun">=</span> <span class="lit">128M</span><span class="pln">

	path			</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">data</span><span class="pun">/</span><span class="pln">testrt

	rt_field		</span><span class="pun">=</span><span class="pln"> title
	rt_field		</span><span class="pun">=</span><span class="pln"> content
	rt_attr_uint		</span><span class="pun">=</span><span class="pln"> gid
</span><span class="pun">}</span><span class="pln">


indexer
</span><span class="pun">{</span><span class="pln">
	mem_limit		</span><span class="pun">=</span> <span class="lit">128M</span>
<span class="pun">}</span><span class="pln">


searchd
</span><span class="pun">{</span><span class="pln">
	listen			</span><span class="pun">=</span> <span class="lit">9312</span><span class="pln">
	listen			</span><span class="pun">=</span> <span class="lit">9306</span><span class="pun">:</span><span class="pln">mysql41
	log			</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">log</span><span class="pun">/</span><span class="pln">searchd</span><span class="pun">.</span><span class="pln">log
	query_log		</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">log</span><span class="pun">/</span><span class="pln">query</span><span class="pun">.</span><span class="pln">log
	read_timeout		</span><span class="pun">=</span> <span class="lit">5</span><span class="pln">
	max_children		</span><span class="pun">=</span> <span class="lit">30</span><span class="pln">
	pid_file		</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">log</span><span class="pun">/</span><span class="pln">searchd</span><span class="pun">.</span><span class="pln">pid
	seamless_rotate		</span><span class="pun">=</span> <span class="lit">1</span><span class="pln">
	preopen_indexes		</span><span class="pun">=</span> <span class="lit">1</span><span class="pln">
	unlink_old		</span><span class="pun">=</span> <span class="lit">1</span><span class="pln">
	workers			</span><span class="pun">=</span><span class="pln"> threads </span><span class="com"># for RT to work</span><span class="pln">
	binlog_path		</span><span class="pun">=</span> <span class="str">/data/</span><span class="pln">sphinx</span><span class="pun">/</span><span class="pln">data
</span><span class="pun">}</span>
未经允许不得转载:798VPS » 安装/配置sphinx

相关推荐

  • 暂无文章