模糊搜索释文
接口地址:/book/explain/explain
请求方式:GET
响应数据类型:application/json
接口描述:
根据释文模糊搜索得到列表,通过headword再调用内容/释文接口。高亮里面包含text
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
Authorization | 授权请求头 | header | true | string | |
x-jd-device | 设备信息 | header | false | string | |
q | 要搜索的字/词 | query | false | string | |
textLength | text最大长度,超出会截取掉 | query | false | integer(int32) | |
size | 页的大小 | query | false | integer(int32) | |
page | 页码 | query | false | integer(int32) | |
bookId | 需要搜索的书籍,为空搜索全部有权限的书籍 | query | false | array | integer |
响应状态:
状态码 | 说明 | schema |
---|---|---|
200 | OK | object |
响应参数:
参数名称 | 参数说明 | 类型 | schema |
---|---|---|---|
totalPages | integer(int32) | integer(int32) | |
totalElements | integer(int64) | integer(int64) | |
size | integer(int32) | integer(int32) | |
content | array | object | |
content | object | ||
headword | 词头 | string | |
bookName | 书名 | string | |
bookId | 书籍id | integer(int64) | |
simplified | 简体 | string | |
text | 简单释文 | string | |
highlights | 高亮 | object | |
number | integer(int32) | integer(int32) | |
sort | array | object | |
direction | string | ||
nullHandling | string | ||
ascending | boolean | ||
property | string | ||
ignoreCase | boolean | ||
first | boolean | ||
last | boolean | ||
numberOfElements | integer(int32) | integer(int32) | |
pageable | object | object | |
offset | integer(int64) | ||
sort | array | object | |
direction | string | ||
nullHandling | string | ||
ascending | boolean | ||
property | string | ||
ignoreCase | boolean | ||
pageSize | integer(int32) | ||
pageNumber | integer(int32) | ||
paged | boolean | ||
unpaged | boolean | ||
empty | boolean |
响应示例:
{
"totalPages": 0,
"totalElements": 0,
"size": 0,
"content": [
{
"content": {
"headword": "",
"bookName": "",
"bookId": 0,
"simplified": "",
"text": ""
},
"highlights": {}
}
],
"number": 0,
"sort": [
{
"direction": "",
"nullHandling": "",
"ascending": true,
"property": "",
"ignoreCase": true
}
],
"first": true,
"last": true,
"numberOfElements": 0,
"pageable": {
"offset": 0,
"sort": [
{
"direction": "",
"nullHandling": "",
"ascending": true,
"property": "",
"ignoreCase": true
}
],
"pageSize": 0,
"pageNumber": 0,
"paged": true,
"unpaged": true
},
"empty": true
}