This commit is contained in:
suguo.yao 2022-10-14 16:36:39 +08:00
commit d20524362c
2 changed files with 82 additions and 0 deletions

61
api-test.http Normal file
View File

@ -0,0 +1,61 @@
# @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=default HTTP/1.1
Authorization:
{
"id": 88188,
"text": "北京北站",
"document": {
"title": "阿森松岛所445",
"number": 223
}
}
###批量增加/修改索引
POST {{url}}/index/batch?database=default HTTP/1.1
[{
"id": 88887,
"text": "深圳南站",
"document": {
"title": "阿森松岛所445",
"number": 223
}
},{
"id": 22222,
"text": "北京东站",
"document": {
"title": "123123123",
"number": 123123
}
}]
#### 删除索引
POST {{url}}/index/remove?database=default HTTP/1.1
{
"id":88887
}
#### 查询索引
POST {{url}}/query HTTP/1.1
{
"query":"北京",
"page":1,
"limit":10,
"order": "DESC",
"highlight": {
"preTag":"<span style='color:red'>",
"postTag":"</span>"
}
}
#### 查询索引
POST {{url}}/query?database=default HTTP/1.1
{"query":"北京","page":1,"limit":10,"highlight":{"preTag":"<em style='color:red'>","postTag":"</em>"},"order":"DESC"}

21
readme.md Normal file
View File

@ -0,0 +1,21 @@
# GOFOUND
#### 概述
代替elasticsearch原本只想做个测试学习过程中发现原项目BUG并且自己产生此想法因此进行项目优化改进。
#### 项目资料
https://github.com/sea-team/gofound
#### 实例环境构建
> git clone https://github.com/sea-team/gofound.git
> docker build -t gofound .
> docker run -d --name gofound -p 5678:5678 -v /mnt/data/gofound:/usr/local/go_found/data gofound:latest
#### 后台
http://192.168.0.254:5678/admin admin / 123456