#启动coreseek
/usr/local/coreseek/bin/searchd -c /usr/local/coreseek/etc/csft.conf
#创建
/usr/local/coreseek/bin/indexer --rotate --all
/usr/local/coreseek/bin/indexer main --rotate >>/usr/local/coreseek/var/log/merge.log
/usr/local/coreseek/bin/indexer delta --rotate >>/usr/local/coreseek/var/log/delta.log
#停止coreseek
/usr/local/coreseek/bin/searchd -c /usr/local/coreseek/etc/csft.conf
#创建
/usr/local/coreseek/bin/indexer --rotate --all
/usr/local/coreseek/bin/indexer main --rotate >>/usr/local/coreseek/var/log/merge.log
/usr/local/coreseek/bin/indexer delta --rotate >>/usr/local/coreseek/var/log/delta.log
#停止coreseek
/usr/local/coreseek/bin/searchd -c /usr/local/coreseek/etc/csft.conf --stop
启动:
/usr/local/coreseek/bin/searchd -c etc/csft.conf
php例子代码:
<?php
require ( "sphinxapi.php" );
//echo 1234;
//exit;
$cl = new SphinxClient ();
$cl->SetServer ( '127.0.0.1', 9312);
//以下设置用于返回数组形式的结果
$cl->SetArrayResult ( true );
$cl->SetMatchMode ( SPH_MATCH_ANY );
$cl->SetSortMode(SPH_SORT_EXTENDED,"@weight DESC,@id DESC");
//$cl->SetSortMode ( SPH_SORT_ATTR_DESC, "date_added" );
$res = $cl->Query("img src=\"http://test.bingxue.com:8000/js/ueditor/php/upload/74301392975397.jpg","*");
print_r($res["matches"]);
print_r($res);
print_r($cl->GetLastError());
print_r($cl->GetLastWarning());
print("\n");