localhost:8888 搜索失败

来源:17-11 完善前端展示

Herron___

2019-01-12

老师您好,我运行完start.go 之后,localhost:8888网页可以打开,也能显示封面,但是搜索内容的时候总是出错,提示“json: cannot unmarshal object into Go struct field SearchHits.total of type int64”. 请问老师这是哪里出错了? 我的searchresult_test 通过了,爬虫本身也没有问题。

写回答

2回答

脑子笨学不会

2019-01-23

是不是deserialize这块的函数有问题啊?

0
0

ccmouse

2019-01-13

应该是elastic search的结果有错。我们现需要把这个搜索出来的这个err打出来,见https://git.imooc.com/coding-180/coding-180/src/master/crawler/frontend/controller/searchresult.go#L79


0
0

Google资深工程师深度讲解Go语言 由浅入深掌握Go语言

语法+分布式爬虫实战 为转型工程师量身打造

5995 学习 · 1909 问题

查看课程