Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b84cd033
authored
Aug 14, 2021
by
leejoker
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
删除es创建索引代码
1 parent
dac43b46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
48 deletions
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeSensitiveServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeSensitiveServiceImpl.java
View file @
b84cd03
...
...
@@ -22,9 +22,6 @@ import com.linkwechat.wecom.service.IWeSensitiveService;
import
com.linkwechat.wecom.service.IWeUserService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.exception.ExceptionUtils
;
import
org.elasticsearch.common.xcontent.XContentBuilder
;
import
org.elasticsearch.common.xcontent.XContentFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
...
...
@@ -222,49 +219,4 @@ public class WeSensitiveServiceImpl implements IWeSensitiveService {
});
return
users
;
}
private
XContentBuilder
getSensitiveHitMapping
()
{
try
{
//创建索引
XContentBuilder
mapping
=
XContentFactory
.
jsonBuilder
()
.
startObject
()
.
startObject
(
"properties"
)
.
startObject
(
"msgid"
)
.
field
(
"type"
,
"keyword"
)
.
endObject
()
.
startObject
(
"seq"
)
.
field
(
"type"
,
"long"
)
.
endObject
()
.
startObject
(
"action"
)
.
field
(
"type"
,
"keyword"
)
.
endObject
()
.
startObject
(
"from"
)
.
field
(
"type"
,
"keyword"
)
.
endObject
()
.
startObject
(
"roomid"
)
.
field
(
"type"
,
"keyword"
)
.
endObject
()
.
startObject
(
"msgtime"
)
.
field
(
"type"
,
"long"
)
.
endObject
()
.
startObject
(
"msgtype"
)
.
field
(
"type"
,
"keyword"
)
.
endObject
()
.
startObject
(
"status"
)
.
field
(
"type"
,
"keyword"
)
.
endObject
()
.
startObject
(
"pattern_words"
)
.
field
(
"type"
,
"keyword"
)
.
endObject
()
.
startObject
(
"content"
)
.
field
(
"type"
,
"text"
)
.
endObject
()
.
endObject
()
.
endObject
();
return
mapping
;
}
catch
(
Exception
e
)
{
log
.
warn
(
"create sensitive-hit mapping failed, exception={}"
,
ExceptionUtils
.
getStackTrace
(
e
));
}
return
null
;
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment