From d20524362cb0201f6308ee3ff19b2776ac12428c Mon Sep 17 00:00:00 2001 From: "suguo.yao" Date: Fri, 14 Oct 2022 16:36:39 +0800 Subject: [PATCH] init --- api-test.http | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ readme.md | 21 ++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 api-test.http create mode 100644 readme.md diff --git a/api-test.http b/api-test.http new file mode 100644 index 0000000..e601afe --- /dev/null +++ b/api-test.http @@ -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":"", + "postTag":"" + } +} + +#### 查询索引 +POST {{url}}/query?database=default HTTP/1.1 + +{"query":"北京","page":1,"limit":10,"highlight":{"preTag":"","postTag":""},"order":"DESC"} \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..abd1931 --- /dev/null +++ b/readme.md @@ -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 \ No newline at end of file