Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
my-awesome-project
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a85343c1
authored
Jun 21, 2024
by
岳巧源
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
use new query
parent
58fda511
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletions
main.py
main.py
View file @
a85343c1
...
...
@@ -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
=
query
2
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment