103 lines
1.9 KiB
HTTP
103 lines
1.9 KiB
HTTP
# @url=http://admin:123456@192.168.0.254:5678/api
|
|
# @url=http://192.168.0.254:5678/api
|
|
@url=http://127.0.0.1:5678/api
|
|
|
|
###增加/修改索引
|
|
POST {{url}}/index?database=aaa HTTP/1.1
|
|
Authorization:
|
|
|
|
{
|
|
"id": 88188,
|
|
"text": "北京北站",
|
|
"document": {
|
|
"title": "阿森松岛所445",
|
|
"number": 223
|
|
}
|
|
}
|
|
|
|
###增加/修改索引 没有database时database is empty"
|
|
POST {{url}}/index?database=default HTTP/1.1
|
|
Authorization:
|
|
|
|
{
|
|
"id":111,
|
|
"text": "北京北三站",
|
|
"document": {
|
|
"title": "阿森松岛所245",
|
|
"number": 226
|
|
}
|
|
}
|
|
|
|
###批量增加/修改索引
|
|
POST {{url}}/index/batch?database=default HTTP/1.1
|
|
|
|
[{
|
|
"id": 88887,
|
|
"text": "深圳南站 Systems Engineering Services",
|
|
"document": {
|
|
"title": "阿森松岛所445",
|
|
"number": 223
|
|
}
|
|
},{
|
|
"id": 22222,
|
|
"text": "北京东站",
|
|
"document": {
|
|
"title": "123123123",
|
|
"number": 123123
|
|
}
|
|
}]
|
|
|
|
#### 删除索引
|
|
POST {{url}}/index/remove?database=default HTTP/1.1
|
|
|
|
{
|
|
"id":1420489961
|
|
}
|
|
|
|
#### 公开查询索引
|
|
POST http://192.168.0.254:5678/ HTTP/1.1
|
|
|
|
{
|
|
"query":"Engineering",
|
|
"page":1,
|
|
"limit":10,
|
|
"order": "DESC",
|
|
"highlight": {
|
|
"preTag":"<span style='color:red'>",
|
|
"postTag":"</span>"
|
|
}
|
|
}
|
|
|
|
#### 查询索引
|
|
POST {{url}}/query HTTP/1.1
|
|
|
|
{
|
|
"query":"Engineering",
|
|
"page":1,
|
|
"limit":10,
|
|
"order": "DESC",
|
|
"highlight": {
|
|
"preTag":"<span style='color:red'>",
|
|
"postTag":"</span>"
|
|
}
|
|
}
|
|
|
|
#### 查询索引2
|
|
POST {{url}}/query?database=default HTTP/1.1
|
|
|
|
{"query":"北京","page":1,"limit":10,"highlight":{"preTag":"<em style='color:red'>","postTag":"</em>"},"order":"DESC"}
|
|
|
|
#### 查询状态
|
|
GET {{url}}/status HTTP/1.1
|
|
|
|
#### 创建数据库
|
|
GET {{url}}/db/create?database=aaa HTTP/1.1
|
|
|
|
#### 删除数据库 数据库不存在
|
|
GET {{url}}/db/drop?database=aaa HTTP/1.1
|
|
|
|
#### 显示数据库
|
|
GET {{url}}/db/list HTTP/1.1
|
|
|
|
#### 在线分词
|
|
GET {{url}}/word/cut?q=Systems Engineering Services HTTP/1.1 |