sunliwen / poco

Poco v1.6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[好药师] 搜索结果facets中有些label为空

jacobfan opened this issue · comments

GET 'http://poco.tuijianbao.net/api/v1.6/public/search/'

参数:{"api_key":"prod-b02c65ef","facets":{"brand":{},"categories":{"mode":"SUB_TREE"},"dosage":{},"origin_place":{},"prescription_type":{}},"filters":{},"highlight":false,"page":1,"per_page":45,"q":""}

结果中,facets里,例如分类488, 527,label为空。

我去线上 mongodb 中查看了一下brand的情况,客户反馈的的 488, 527 都是在 mongodb 中没有数据的。

问题产生的原因在 tasks.py, process_item_update_queue 中, updateProperty 时,只通过 id 来匹配,并未匹配type, 导致了更新 id 为 488 的 category 时,覆盖 id 为 488 的 brand。