Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
messageflow
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
虞诚毅
messageflow
Commits
90ccf7e8
Commit
90ccf7e8
authored
May 14, 2019
by
303514581@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2019/5/14 去除有关键词匹配下,无关键词命中的消息
parent
031034c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
src/main/java/com/zhiwei/messageflow/es/service/impl/HighLightFillingServiceImpl.java
+6
-4
No files found.
src/main/java/com/zhiwei/messageflow/es/service/impl/HighLightFillingServiceImpl.java
View file @
90ccf7e8
...
...
@@ -792,6 +792,9 @@ public class HighLightFillingServiceImpl implements HighLightFillingService {
// 网媒
res
=
handleMediaBeanNew
(
searchHit
,
res
,
keywords
);
}
if
(
Tools
.
isEmpty
(
res
.
getObject
(
"hlMap"
,
Map
.
class
))
&&
!
Tools
.
isEmpty
(
keywords
))
{
return
null
;
}
return
res
;
}
...
...
@@ -1005,7 +1008,7 @@ public class HighLightFillingServiceImpl implements HighLightFillingService {
.
sorted
((
Map
.
Entry
<
String
,
Integer
>
o1
,
Map
.
Entry
<
String
,
Integer
>
o2
)
->
o2
.
getValue
()
-
o1
.
getValue
())
.
skip
(
0
).
limit
(
5
).
collect
(
Collectors
.
toMap
(
p
->
p
.
getKey
(),
p
->
p
.
getValue
()));
res
.
put
(
"hLMap"
,
hLMap
);
// Text[] contentlist = highlightFieldsHitMap.containsKey("content")
// ? highlightFieldsHitMap.get("content").getFragments()
// : null;
...
...
@@ -1024,7 +1027,7 @@ public class HighLightFillingServiceImpl implements HighLightFillingService {
// }
// res.put("content", contenthl);
// res.put("title", title);
res
.
put
(
"content"
,
""
);
res
.
put
(
"title"
,
""
);
...
...
@@ -1076,7 +1079,6 @@ public class HighLightFillingServiceImpl implements HighLightFillingService {
.
skip
(
0
).
limit
(
5
).
collect
(
Collectors
.
toMap
(
p
->
p
.
getKey
(),
p
->
p
.
getValue
()));
res
.
put
(
"hLMap"
,
hLMap
);
// Text[] contentlist = highlightFieldsHitMap.containsKey("content")
// ? highlightFieldsHitMap.get("content").getFragments()
// : null;
...
...
@@ -1096,7 +1098,7 @@ public class HighLightFillingServiceImpl implements HighLightFillingService {
//
// res.put("content", contenthl);
// res.put("title", title);
res
.
put
(
"content"
,
""
);
res
.
put
(
"title"
,
""
);
...
...
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