Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
brandkbs2
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
shenjunjie
brandkbs2
Commits
a45a21ab
Commit
a45a21ab
authored
Apr 19, 2024
by
shenjunjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release' into 'master'
Release See merge request
!485
parents
eb89b9b4
afbb7c1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/main/java/com/zhiwei/brandkbs2/es/EsQueryTools.java
+8
-8
No files found.
src/main/java/com/zhiwei/brandkbs2/es/EsQueryTools.java
View file @
a45a21ab
...
...
@@ -417,18 +417,18 @@ public class EsQueryTools {
public
static
void
addSensitiveChannel
(
BrandkbsYuQingConfigNew
config
,
BoolQueryBuilder
boolQueryBuilder
)
{
BoolQueryBuilder
hitBoolQuery
=
QueryBuilders
.
boolQuery
();
if
(!
Tools
.
isEmpty
(
config
.
getPoliticsLevels
()))
{
if
(!
Tools
.
isEmpty
(
config
.
getPoliticsLevels
())
&&
!
config
.
getPoliticsLevels
().
contains
(
"全部"
)
)
{
List
<
String
>
hitList
=
config
.
getPoliticsLevels
();
if
(
config
.
getPoliticsLevels
().
contains
(
"全部"
))
{
hitList
=
ChannelType
.
POLITICS_LEVELS
;
}
//
if (config.getPoliticsLevels().contains("全部")) {
//
hitList = ChannelType.POLITICS_LEVELS;
//
}
hitList
.
forEach
(
politicsLevel
->
hitBoolQuery
.
should
(
QueryBuilders
.
termQuery
(
GenericAttribute
.
ES_SENSITIVE_CHANNEL
+
"."
+
GenericAttribute
.
ES_POLITICS_LEVEL
+
".keyword"
,
politicsLevel
)));
}
if
(!
Tools
.
isEmpty
(
config
.
getFields
()))
{
if
(!
Tools
.
isEmpty
(
config
.
getFields
())
&&
!
config
.
getFields
().
contains
(
"全部"
)
)
{
List
<
String
>
hitList
=
config
.
getFields
();
if
(
config
.
getFields
().
contains
(
"全部"
))
{
hitList
=
ChannelType
.
COMMON_FIELDS
;
}
//
if (config.getFields().contains("全部")) {
//
hitList = ChannelType.COMMON_FIELDS;
//
}
hitList
.
forEach
(
field
->
hitBoolQuery
.
should
(
QueryBuilders
.
termQuery
(
GenericAttribute
.
ES_SENSITIVE_CHANNEL
+
"."
+
GenericAttribute
.
ES_FIELD
+
".keyword"
,
field
)));
}
boolQueryBuilder
.
must
(
hitBoolQuery
);
...
...
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