我在couchdb中有一个全文lucene搜索,但问题是它只给出了响应。我想改变回应。有可能吗?
{
"_id": "_design/foo",
"_rev": "4-90b71100ac746407a05b504926d64dbb",
"fulltext": {
"by_subject": {
"index": "function(doc) { var ret=new Document(); ret.add(doc.subject); return ret }"
},
"by_content": {
"index": "function(doc) { var ret=new Document(); ret.add(doc.content); return ret }"
}
}
}
我正在请求下面的卷曲,
http://localhost:5984/sample/_fti/_design/foo/bysubject?q=mysub
目前我的结果为:
{" Q":"默认:子"" fetch_duration":0," TOTAL_ROWS":1,"限":25," search_duration":1," ETAG":" 43b7427c462d""跳过":0,&#34 ;行":[{"得分":6.782285690307617" ID":" 001"}]}
实际上我需要在响应中添加更多细节,如:
{" Q":"默认:子"" fetch_duration":0," TOTAL_ROWS":1,"限":25," search_duration":1," ETAG":" 43b7427c462d""跳过":0,&#34 ;行":[{"得分":6.782285690307617" ID":" 001""子":" mysub""细节":" mydetails"}]}