前提:在第一次成功索引后修改mysql表的几个字段的值,然后重新索引bin/indexer -c etc/sphinx.conf --all出现下列问题:
直接sphinx/bin/search 修改后的字符
没有问题
但是用php搜索就没有结果。可是搜索老的数据没有问题。就好像php搜不到新被索引的数据似的。
请问是为什么呢???PHP如下:
<?php
require ("sphinxapi.php");
$s = new SphinxClient ();
$s->SetServer("localhost",9312);
$q = "shadow";
$result = $s->Query($q,"*");
print_r($result);
?>