我試圖在solr上進行簡單的分組,但沒有成功,只有2個字段的數據庫ID和名稱嘗試在字段「名稱」上進行分組。我希望得到一個列名爲「yosi」但我得到4行 我應該在PARAMS更改下面solr上的分組
object(Apache_Solr_Response)#3 (5) {
["_response":protected]=>
object(Apache_Solr_HttpTransport_Response)#4 (5) {
["_statusCode":"Apache_Solr_HttpTransport_Response":private]=>
int(200)
["_statusMessage":"Apache_Solr_HttpTransport_Response":private]=>
string(2) "OK"
["_mimeType":"Apache_Solr_HttpTransport_Response":private]=>
string(10) "text/plain"
["_encoding":"Apache_Solr_HttpTransport_Response":private]=>
string(5) "utf-8"
["_responseBody":"Apache_Solr_HttpTransport_Response":private]=>
string(767) "{
"responseHeader":{
"status":0,
"QTime":2,
"params":{
"indent":"true",
"group.query":"yosi",
"json.nl":"map",
"hl.fl":"name",
"wt":"json",
"hl":"true",
"version":"2.2",
"rows":"100",
"fl":"*,score",
"start":"0",
"q":"yosi",
"group.field":"name",
"group":"true",
"qt":"standard"}},
"response":{"numFound":4,"start":0,"maxScore":1.8754687,"docs":[
請讓我知道爲什麼它不會做的工作 感謝 Yosi
請您發佈您的完整回覆? – javanna 2012-03-27 08:09:47