停用,請改用 search/all_in_one ,2025 年起停用此 endpoint。
參數名稱 | 說明 |
q |
要搜尋的關鍵字。(標點符號會被去除,包括半形小括號) 也可使用 Extended 語法 。例如:
關鍵字詞中若含:單引號、雙引號、半形減號,需 escape,例如:
|
note | 是否含夾注: 0: 不含夾注。 1: 含夾注(預設值)。 |
fields | 指定要回傳哪些欄位,例: https://api.cbetaonline.cn/sphinx/all_in_one?q=法鼓&fields=work,juan,term_hits |
facet |
是否回傳 facet。 預設為 0: 不回傳 facet。 若設為 1 則會回傳四種 facet: 藏經 (canon)、部類 (category)、作譯者 (creator)、朝代 (dynasty)、佛典 (work)。 |
rows | 每頁回傳卷數,預設為 20。 |
start | 每頁起始位置,預設為 0。 |
around | kwic 前後字數,預設為 10。 |
order |
排序,可用欄位:
預設是依 canon 來排序。 每一個排序欄位都可以指定使用升冪排序或降冪排序:
|
{ "query_string": "法鼓", "SQL": "SELECT id, juan, canon, vol, work, byline, weight() as term_hits FROM cbeta WHERE MATCH('\"法鼓\"') LIMIT 0, 20 OPTION ranker=wordcount,max_matches=1062", "time": 0.272479, "num_found": 1059, "total_term_hits": 1492, "results": [ { "juan": 1, "canon": "T", "vol": "T09", "work": "T0270", "byline": "劉宋 求那跋陀羅譯", "term_hits": 31, "title": "大法鼓經", "juan_list": "1,2", "file": "T09n0270", "juan_start": 1, "kwics": { "num_found": 31, "results": [ { "lb": "0292a22", "kwic": ";法王祇洹林,擊於大<mark>法鼓</mark>。」佛告迦葉:「汝今" }, { "lb": "0291c14", "kwic": "世尊說大法鼓經、擊大<mark>法鼓</mark>、吹大法䗍。」佛言:" },... ] } }, { "juan": 2, "canon": "T", "vol": "T09", "work": "T0270", "byline": "劉宋 求那跋陀羅譯", "term_hits": 15, "title": "大法鼓經", "juan_list": "1,2", "file": "T09n0270", "juan_start": 1, "kwics": { "num_found": 15, "results": [ { "lb": "0298c21", "kwic": "護持如今正法,當擊大<mark>法鼓</mark>、吹大法䗍、設大法會" }, { "lb": "0299a10", "kwic": "——於我滅後,當擊大<mark>法鼓</mark>、吹大法䗍、設大法會" },... ] } },... ] }
{ "query_string": "法鼓", ... "results": [...], "facet": { "category": [ { "category_id": 17, "juans": 283, "category_name": "禪宗部類" }, { "category_id": 23, "juans": 151, "category_name": "新編部類" }... ], "creator": [ { "creator_id": "A001519", "juans": 23 }, { "creator_id": "A001755", "juans": 21 }... ], "dynasty": [ { "dynasty": "清", "juans": 216 }, { "dynasty": "唐", "juans": 164 }... ], "work": [ { "work": "B0088", "title": "古今圖書集成選輯(上)", "juans": 32 }, { "work": "B0192", "title": "釋文紀", "juans": 17 },... ] } }