我想用my php2在这个php代码中搜索。
$results = $s->query("foo","index2");
$results = $s->query("foo","index2");
但它返回mytable的结果。 mytable和mytable2在sphinx.conf中描述。
这是我的配置文件:sphinx.conf
source src
{
type = mysql
sql_host = localhost
sql_user =
sql_pass =
sql_db = db
sql_port = 3306 # optional, default is 3306
sql_query = SELECT id,title,content FROM mytable
}
index index
{
source = src
path = /var/lib/sphinx/src1
}
source src2
{
type = mysql
sql_host = localhost
sql_user =
sql_pass =
sql_db = db
sql_port = 3306 # optional, default is 3306
sql_query = SELECT id,title,content FROM mytable2
}
index index2
{
source = src2
path = /var/lib/sphinx/src2
}
我错过了什么,或者我只是误解了我应该做的事情?