Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
Sign up now
Login
Sign in / Register
Toggle navigation
Menu
Open sidebar
基础系统代码资料
数据检索服务
Commits
0bf974bd
Commit
0bf974bd
authored
1 month ago
by
l fc
Browse files
Options
Download
Email Patches
Plain Diff
fix(es):修复高级检索code值问题
parent
55169f20
feature_sync_dev
feature_20250507
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
search-es-standard-search/search-module-es-standard-search-biz/src/main/java/cn/standard/search/module/search/mapper/MvServerStandardMapper.java
+5
-2
...d/search/module/search/mapper/MvServerStandardMapper.java
with
5 additions
and
2 deletions
+5
-2
search-es-standard-search/search-module-es-standard-search-biz/src/main/java/cn/standard/search/module/search/mapper/MvServerStandardMapper.java
+
5
-
2
View file @
0bf974bd
...
...
@@ -435,7 +435,7 @@ public class MvServerStandardMapper {
// 处理全文搜索条件
if
(
mvServerStandardEntity
.
isFullText
())
{
boolQueryBuilder
.
must
(
QueryBuilders
.
matchQuery
(
"a
330
"
,
mvServerStandardEntity
.
getStandardInfo
()));
boolQueryBuilder
.
must
(
QueryBuilders
.
matchQuery
(
"a
298
"
,
mvServerStandardEntity
.
getStandardInfo
()));
}
// 处理日期范围查询
...
...
@@ -509,6 +509,7 @@ public class MvServerStandardMapper {
shouldQuery
.
should
(
QueryBuilders
.
termQuery
(
"icsn3"
,
code
));
}
boolQueryBuilder
.
must
(
shouldQuery
);
boolQueryBuilder
.
mustNot
(
QueryBuilders
.
termQuery
(
"domain"
,
"D_NATIVE"
));
}
//层级检索
if
(
StringUtils
.
isNotBlank
(
mvServerStandardEntity
.
getLevelCode
()))
{
...
...
@@ -521,8 +522,10 @@ public class MvServerStandardMapper {
shouldQuery
.
should
(
QueryBuilders
.
termQuery
(
"a104"
,
code
));
}
boolQueryBuilder
.
must
(
shouldQuery
);
// 添加排除条件:domain"D_FOREIGN"
boolQueryBuilder
.
mustNot
(
QueryBuilders
.
termQuery
(
"domain"
,
"D_FOREIGN"
));
}
if
(
StringUtils
.
isNotBlank
(
mvServerStandardEntity
.
getSubtypedes
())&&
mvServerStandardEntity
.
getSubtypedes
().
equals
(
"0"
)){
if
(
StringUtils
.
isNotBlank
(
mvServerStandardEntity
.
getSubtypedes
())&&
mvServerStandardEntity
.
getSubtypedes
().
equals
(
"0"
)){
boolQueryBuilder
.
must
(
QueryBuilders
.
termQuery
(
"subtypedes"
,
"国家标准"
));
boolQueryBuilder
.
must
(
QueryBuilders
.
termQuery
(
"issuer"
,
"GB"
));
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets