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
bbfae147
Commit
bbfae147
authored
Aug 26, 2021
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改索引
parent
ce159a47
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
README.md
+2
-0
util/insertToEs.js
+2
-5
No files found.
README.md
0 → 100644
View file @
bbfae147
实现商标近似查询
\ No newline at end of file
util/insertToEs.js
View file @
bbfae147
...
...
@@ -5,9 +5,6 @@ const es = require("../client/esclient");
*/
async
function
start
()
{
let
where
=
{
_id
:
{
$gt
:
"611d4f9895c286d09c699513"
}
}
let
i
=
0
;
while
(
where
)
{
...
...
@@ -18,7 +15,7 @@ async function start() {
console
.
log
(
i
++
)
console
.
log
(
"1:"
,
data
[
0
].
_id
)
for
(
let
val
of
data
)
{
array
.
push
({
"index"
:
{
"_index"
:
"t
est3
"
}
},
{
array
.
push
({
"index"
:
{
"_index"
:
"t
rademark
"
}
},
{
name
:
val
.
name
.
trim
(),
length
:
val
.
name
.
trim
().
length
,
cnlength
:
val
.
name
.
trim
().
replace
(
/
[^\u
4E00-
\u
9FA5
]
/g
,
''
).
length
,
...
...
@@ -27,7 +24,7 @@ async function start() {
})
}
await
es
.
bulk
({
index
:
"t
est3
"
,
index
:
"t
rademark
"
,
body
:
array
})
...
...
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