跳到主要内容
版本:v2

模糊搜索释文

接口地址:/book/explain/explain

请求方式:GET

响应数据类型:application/json

接口描述:

根据释文模糊搜索得到列表,通过headword再调用内容/释文接口。高亮里面包含text

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
Authorization授权请求头headertruestring
x-jd-device设备信息headerfalsestring
q要搜索的字/词queryfalsestring
textLengthtext最大长度,超出会截取掉queryfalseinteger(int32)
size页的大小queryfalseinteger(int32)
page页码queryfalseinteger(int32)
bookId需要搜索的书籍,为空搜索全部有权限的书籍queryfalsearrayinteger

响应状态:

状态码说明schema
200OKobject

响应参数:

参数名称参数说明类型schema
totalPagesinteger(int32)integer(int32)
totalElementsinteger(int64)integer(int64)
sizeinteger(int32)integer(int32)
contentarrayobject
  contentobject
    headword词头string
    bookName书名string
    bookId书籍idinteger(int64)
    simplified简体string
    text简单释文string
  highlights高亮object
numberinteger(int32)integer(int32)
sortarrayobject
  directionstring
  nullHandlingstring
  ascendingboolean
  propertystring
  ignoreCaseboolean
firstboolean
lastboolean
numberOfElementsinteger(int32)integer(int32)
pageableobjectobject
  offsetinteger(int64)
  sortarrayobject
    directionstring
    nullHandlingstring
    ascendingboolean
    propertystring
    ignoreCaseboolean
  pageSizeinteger(int32)
  pageNumberinteger(int32)
  pagedboolean
  unpagedboolean
emptyboolean

响应示例:

{
"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
}