Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
trademarkSimilar
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邵兴业
trademarkSimilar
Commits
cf9c6011
Commit
cf9c6011
authored
Aug 31, 2021
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 优化一版
parent
5a2f954a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
36 deletions
+62
-36
README.md
+4
-0
routes/index.js
+32
-24
startV1.js
+0
-0
util/creat.json
+3
-0
views/index.html
+23
-12
No files found.
README.md
View file @
cf9c6011
...
...
@@ -10,6 +10,7 @@ cerebro: http://192.168.18.102:3000
cnlength:"中文长度",
enlength:"英文长度",
otherlength:"数字特殊符号长度",
pinyin:"同音字设计",
"name" : {
"type" : "keyword",
"fields" : {
...
...
@@ -181,6 +182,9 @@ cerebro: http://192.168.18.102:3000
},
"otherlength"
:
{
"type"
:
"integer"
},
"pinyin"
:{
"type"
:
"keyword"
}
}
}
...
...
routes/index.js
View file @
cf9c6011
const
router
=
require
(
'koa-router'
)()
const
start
=
require
(
"../start"
)
const
start
=
require
(
"../start
V1
"
)
const
es
=
require
(
"../client/esclient"
);
router
.
get
(
'/'
,
async
(
ctx
,
next
)
=>
{
await
ctx
.
render
(
'index'
)
...
...
@@ -8,29 +8,37 @@ router.get('/', async (ctx, next) => {
router
.
post
(
'/list'
,
async
(
ctx
,
next
)
=>
{
const
{
page
,
limit
,
conditions
,
name
}
=
ctx
.
request
.
body
;
let
query
=
await
start
(
name
,
conditions
)
query
=
{
query
:
{
bool
:
{
should
:
query
}
},
"from"
:
(
page
-
1
)
*
limit
,
"size"
:
limit
,
}
console
.
log
(
JSON
.
stringify
(
query
))
const
data
=
await
es
.
search
({
index
:
"trademarkv2"
,
body
:
query
})
const
{
body
:
{
hits
:
{
total
,
hits
}
}
}
=
data
;
ctx
.
body
=
{
list
:
hits
.
map
(
item
=>
{
return
{
name
:
item
.
_source
.
name
}
}),
count
:
total
.
value
,
query
if
(
query
.
length
>
0
)
{
query
=
{
query
:
{
bool
:
{
should
:
query
}
},
"from"
:
(
page
-
1
)
*
limit
,
"size"
:
limit
,
}
console
.
log
(
JSON
.
stringify
(
query
))
const
data
=
await
es
.
search
({
index
:
"trademarkv3"
,
body
:
query
})
const
{
body
:
{
hits
:
{
total
,
hits
}
}
}
=
data
;
ctx
.
body
=
{
list
:
hits
.
map
(
item
=>
{
return
{
name
:
item
.
_source
.
name
}
}),
count
:
total
.
value
,
query
}
}
else
{
ctx
.
body
=
{
list
:
[],
count
:
0
,
query
}
}
})
...
...
startV1.js
0 → 100644
View file @
cf9c6011
This diff is collapsed.
Click to expand it.
util/creat.json
View file @
cf9c6011
...
...
@@ -132,6 +132,9 @@
},
"otherlength"
:
{
"type"
:
"integer"
},
"pinyin"
:
{
"type"
:
"keyword"
}
}
}
...
...
views/index.html
View file @
cf9c6011
...
...
@@ -67,18 +67,29 @@
<script>
const
options
=
[
"1. 完全相同"
,
"2. 完全相同加英文/图形符号,如:小米与小米A或A小米"
,
"3. 倒序或倒序加英文/图形符号,如:小米与米小,全聚德与德聚全;小米与米小A或A米小;"
,
"4.同音不同字或同音不同字加英文/图形符号,如:华为与铧为,华为与铧为A或A铧为;(同词加字母的组合展示)"
,
"5. 同音不同字倒序或同音不同字倒序加英文/图形符号,如:华为与为铧或与为铧A或A为铧"
,
"6. 完全相同后缀加字/词近似,如:小米与小米智慧或小米米等;"
,
"7. 完全相同前缀加字/词近似,如:小米与智慧小米或米小米等;"
,
"8. 倒序后缀加字/词近似,如:华为与为华智慧或为华大等;"
,
"9. 倒序前缀加字/词近似,如:华为与智慧为华或大为华等;"
,
"10. 相同词中加虚词或相同词中加虚词加英文/图形符号,如:小米与小之米或小之米A;"
,
"11. 商标文字含义相同/近似(也包含拼音/英文)"
,
"12. 同字形不同音或同字形不同音加英文/图形符号,如:华为与毕为或毕为A;"
,
"13. 相同减字/词或相同减字/词加英文/图形符号,如:全聚德与全德或全德A;"
"2. 完全相同加英文/图形符号,后缀"
,
"3. 完全相同加英文/图形符号,前缀"
,
"4. 倒序"
,
"5. 倒序加英文/图形符号,后缀"
,
"6. 倒序加英文/图形符号,前缀"
,
"7. 同音不同字"
,
"8. 同音不同字加英文/图形符号,后缀"
,
"9. 同音不同字加英文/图形符号,前缀"
,
"10.同音不同字倒序"
,
"11.同音不同字倒序加英文/图形符号,后缀"
,
"12.同音不同字倒序加英文/图形符号,前缀"
,
"13.完全相同后缀加字/词近似,如:小米与小米智慧或小米米等;"
,
"14.完全相同前缀加字/词近似,如:小米与智慧小米或米小米等;"
,
"15.倒序后缀加字/词近似,如:华为与为华智慧或为华大等;"
,
"16.倒序前缀加字/词近似,如:华为与智慧为华或大为华等;"
,
"17.相同词中加虚词"
,
"18.相同词中加虚词加英文/图形符号"
,
"19.商标文字含义相同/近似(也包含拼音/英文)"
,
"20.同字形不同音"
,
"21.同字形不同音加英文/图形符号"
,
"22.相同减字/词"
,
"23.相同减字/词加英文/图形符号,后缀"
,
"24.相同减字/词加英文/图形符号,前缀"
];
new
Vue
({
el
:
'#app'
,
...
...
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