多可文档平台API
文件夹及文件接口---文件全文检索
    按条件对文件进行全文检索,注意此查询为全文检索,是先对搜索词进行分词处理,再按相关度进行搜索,不是精确查询
请求方式: POST(HTTP/HTTPS)
请求地址: /api/ff/file/search?token=ACCESS_TOKEN
请求包示例
{
    "key": "Linux Docker",
    "notKey": "windows",
    "folderId":"F00003",
    "ext":"docx",
    "rng":0,
    "xdocType":0,
    "withRecycle":false,
    "sortField":1,
    "startUpladTime":"2024-01-02 10:08:00",
    "endUpladTime":"2025-12-31 10:08:00",
    "maxResultNum":10000
} 
参数说明
参数类型必须说明
token string 调用接口凭证
key string 搜索词,多个词中间用空格分割
notKey string 否定词
folderId string 搜索的文件夹范围
ext string 文件类型,比如:docx
=office表示doc,docx,xls,xlsx,ppt,pptx类型
rng int8 =0 搜全部
=1 仅标题
=4 仅文件备注
=5 仅标签/关键词
xdocType int8 =0文件和文件夹
=1仅文件
=2仅文件夹
withRecycle bool true包括回收站文件, false 不包括
sortField int8 =1 相关度倒序
=2上传时间倒序
=3上传时间正序
startUpladTime string 上传开始时间
endUpladTime string 上传结束时间
maxResultNum int32 最多查询数量,系统默认1024
此值越大查询时间越长
返回结果示例
{
    "count": 2,
    "invalids": "",
    "items": [
        {
            "id": "X00040",
            "name": "Linux Docker模式下安装Onlyoffice.docx",
            "modTime": "2025-04-30 14:22:14",
            "createAt": "2025-06-19 12:59:43",
            "xdType": 1,
            "sc": "",
            "size": 1384502,
            "inRecycle": false,
            "fatherId": "F00003",
            "correlation": 0.8040756847486077
        },
        {
            "id": "X00044",
            "name": "如何解决企业文档管理系统中历史数据使用问题.docx",
            "modTime": "2025-04-22 10:49:42",
            "createAt": "2025-06-19 15:42:17",
            "xdType": 1,
            "sc": "",
            "size": 912712,
            "inRecycle": false,
            "fatherId": "F00003",
            "correlation": 0.800291447318227
        }
    ],
    "noPs": 0,
    "time": 0,
    "tips": "搜索到2个相关文档"
} 
返回参数说明
参数类型说明
errcode int32 出错返回码,为0表示成功,非0表示调用失败
errmsg string 返回码提示语
items array 查询到的文件结果
noPs int32 没有权限的文件
time int64 查询时间,单位毫秒
tips string 搜索提示信息
--- items集合字段
id string 文件ID
name string 文件名称
modTime string 文件修改时间
createAt string 上传时间
xdType int8 =1 文件, =2 文件夹
sc string 文件密级描述
size int64 文件大小
inRecycle bool =true 回收站文件, =false 正常文件
fatherId string 文件的所在父文件夹ID
correlation float64 搜索结果相关度
权限要求:搜索结果文件如果有【文件基本信息查看】权限才能显示,没有权限不会出现在结果中。