Commit a85343c1 by 岳巧源

use new query

parent 58fda511
Showing with 16 additions and 1 deletions
......@@ -44,6 +44,21 @@ query = {
}
}
query2 = {
"_source":["goods_id","goods_name","brand_name"],
"query": {
"bool": {
"must": [
{
"match": {
"goods_name": "RG223"
}
}
]
}
}
}
black_list = {"eastsheep", "ABB", "BRsanyuan", "JCSTRONG", "TECHNOLOGY",
"OMRON", "Schneider", "Electric", "ZWZDH", "GKNC",
"ALINX", "DELL", "ANALOG", "DEVICES", "LR-LINK", "molex", "NVIDIA"
......@@ -95,7 +110,7 @@ def main():
score_in_one_row = []
for j in range(len(ans[i])):
tmp_goods_name = ans[i][j]
tmp_query = query
tmp_query = query2
new_str = tmp_goods_name.replace('/', '').replace('-', '')
tmp_query["query"]["bool"]["must"][0]["match"]["goods_name"] = new_str
tmp_map = process(tmp_query, tmp_goods_name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment