Interface SearchHitDTO

全文搜索的命中条目。

NameData TypeRequiredDescription
pathstringYes命中页面路径,相对站点根
titlestringYes页面标题
excerptstringYes命中片段,纯文本
scorenumberYes相关度得分,数值越大越相关
type SearchHitDTO = {
  /** 命中页面路径,相对站点根 */
  path: string
  /** 页面标题 */
  title: string
  /** 命中片段,纯文本 */
  excerpt: string
  /** 相关度得分,数值越大越相关 */
  score: number
}
{
  "path": "cn/api_references/code.html",
  "title": "错误码",
  "excerpt": "……统一响应包装中的 code 字段含义,站点管理接口的业务错误码从 4101 起……",
  "score": 42.5
}