Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
bom_server
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
2435485f
authored
Jun 12, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
匹配修改
parent
b948df87
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
internal/logic/attr.go
internal/mapping/search_keyword.go
internal/logic/attr.go
View file @
2435485f
...
...
@@ -232,7 +232,7 @@ func getQuery(attrs []string) (query *es.BoolQuery) {
nestedQuery
=
es
.
NewNestedQuery
(
"attrs"
,
subQuery
)
query
.
Should
(
nestedQuery
)
}
query
.
MinimumNumberShouldMatch
(
1
)
query
.
MinimumNumberShouldMatch
(
2
)
}
return
query
...
...
internal/mapping/search_keyword.go
View file @
2435485f
...
...
@@ -3,9 +3,9 @@ package mapping
var
KeywordRegular
=
map
[
string
]
string
{
//`^(.* )?([\d\.]+)(欧|欧姆|R|r)( .*)?$`: `$1$2Ω$4`,
//`^(.* )?([\d\.]+)(U|u|μ)(.?)( .*)?$`: `$1$2Μ$4$5`,
"COG"
:
"C0G"
,
"NPO
"
:
"NP0
"
,
"华科|华新科技|华新科"
:
"华新"
,
"COG"
:
"C0G"
,
"NPO
|NP0|nPO|npO|npo|nP0|np0"
:
"C0G
"
,
"华科|华新科技|华新科"
:
"华新"
,
`(欧姆|欧|O|o|R|r)`
:
"Ω"
,
`(Uf|uf|μf|uF|UF)`
:
"μF"
,
...
...
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