Commit 90ccf7e8 by 303514581@qq.com

2019/5/14 去除有关键词匹配下,无关键词命中的消息

parent 031034c1
......@@ -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", "");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment