Closed zhangchunlin closed 2 years ago
好像是文档写错了,得用 index/remove
db/drop 也有问题
注意上面说的api调用返回404问题是发生在 gofound 内置的 /admin 管理网站上的,所以应该是需要修改内置管理网站,因为学习gofound的api使用是大概率会参考内置管理网站的。
@newpanjing There is another PR for gofound-python, please also help to review.
gofound revision: 59d4e00d81fdac02ca049997b7a265e1d6a87b20 gofound-python revision: e170d832a486c3588ddb7e61a0c84eea9e99829b
Use python script in https://github.com/newpanjing/gofound-python/blob/master/README.md, got:
Then access http://localhost:8080/admin/#/ , query with "海南", sent:
got:
{"state":true,"message":"success","data":{"time":0.38622900000000004,"total":1,"pageCount":1,"page":1,"limit":10,"documents":[{"id":1000,"text":"探访\u003cem style='color:red'\u003e海南\u003c/em\u003e自贸港“样板间”","document":{"content":"洋浦经济开发区地处海南西北部洋浦半岛,是21世纪海上丝绸之路与西部陆海新通道的交汇节点。是国务院1992年批准设立的。我国第一个由外商成片开发、享受保税区政策的国家级开发区"},"originalText":"探访海南自贸港“样板间”","score":1,"keys":["海南","自贸港","样板","样板间","探访"]}],"words":["海南"]}}
But remove failed, sent:
{id: 1000}
But got 404: