2013-07-15 20 views
0

我試圖讓所有posiblle答覆,但至今只造成什麼,我得到的是:獅身人面像 - 屬性沒有找到

指數test_responses:組-by屬性「RR」未找到

這裏的sphinx.conf:

source test_responses { 
    type = mysql 
    sql_host = ****** 
    sql_user = ****** 
    sql_pass = ****** 
    sql_db = ****** 
    sql_query_pre = SET NAMES utf8 

    sql_query = \ 
     SELECT responseID, respondentID, response, \ 
      questionID, surveyID, response as rr \ 
     FROM responses WHERE deleted IS NULL 
    sql_attr_string = rr 
    sql_attr_uint = questionID 
    sql_query_info = SELECT * from responses where responseID = $id 
} 

index test_responses { 
    source = test_responses 
    path = /var/run/sphinxsearch 
    charset_type = utf-8 
} 

和PHP代碼:

$query_string = ""; 
$index_name = "test_responses"; 
$sphinx_client = new SphinxClient(); 
$sphinx_client->SetServer(SPHINX_HOSTNAME, 3312); 
$sphinx_client->SetMatchMode(SPH_MATCH_EXTENDED2); 
$sphinx_client->setLimits(0, 0); 

$sphinx_client->SetFilter("questionID", 604); 
$sphinx_client->SetGroupBy("rr", SPH_GROUPBY_ATTR); 
$result = $sphinx_client->Query($query_string, $index_name); 

這是爲什麼發生在我身上? ;}

+1

你更改配置文件後重建索引? – barryhunter

+0

absoluty:indexer --all --rotate – kilkujadek

+1

你有什麼版本的獅身人面像?正如在Moosh的答案中鏈接的幫助頁中所指出的那樣,只有自2.0.1-beta – barryhunter

回答