BaseUrl: http://127.0.0.1:8003
POST
/data/<scene>/id
xxxxxxxxxx
41[
2 {"text" : "text1", "id": 1},
3 {"text" : "text2", "id": 2},
4]
Response
1{"success": true}
Test
xxxxxxxxxx
11curl -X POST http://localhost:8003/data/mpcc/id -d '[{"text" : "text1", "id": 1}, {"text" : "text2", "id": 2}]' -H "Content-Type: application/json"
/data/<scene>/id
Delete
xxxxxxxxxx
11[1,2,3]
Response
xxxxxxxxxx
11{"success": true}
Test
xxxxxxxxxx
11curl -X DELETE http://localhost:8003/data/mpcc/id -d '[1,2]' -H "Content-Type: application/json"
/data/<scene>
Delete
Response
xxxxxxxxxx
11{"success": true}
Test
1curl -X DELETE http://localhost:8003/data/mpcc
GET
/<scene>/query?q=txt
x
1{
2 "query": "txt",
3 "data": [
4 {
5 "id": 2,
6 "distance": 1.0019994974136353,
7 "score": 0.007921289689470035
8 },
9 {
10 "id": 1,
11 "distance": 1.0036646127700806,
12 "score": 0.006272660623682591
13 }
14 ]
15}
通过mpcc, yqfk 区别不同场景.
Test
x
1curl http://127.0.0.1:8003/mpcc/query?q=txt