Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
mall
Commits
d6c7c277
Commit
d6c7c277
authored
Apr 12, 2023
by
macro
Browse files
Update EsProductServiceImpl.java
parent
e21cfe58
Changes
1
Hide whitespace changes
Inline
Side-by-side
mall-search/src/main/java/com/macro/mall/search/service/impl/EsProductServiceImpl.java
View file @
d6c7c277
...
...
@@ -226,9 +226,9 @@ public class EsProductServiceImpl implements EsProductService {
}
//聚合搜索品牌名称
builder
.
withAggregations
(
AggregationBuilders
.
terms
(
"brandNames"
).
field
(
"brandName"
));
//
集
合搜索分类名称
//
聚
合搜索分类名称
builder
.
withAggregations
(
AggregationBuilders
.
terms
(
"productCategoryNames"
).
field
(
"productCategoryName"
));
//聚合搜索商品属性,去除type=
1
的属性
//聚合搜索商品属性,去除type=
0
的属性
AbstractAggregationBuilder
aggregationBuilder
=
AggregationBuilders
.
nested
(
"allAttrValues"
,
"attrValueList"
)
.
subAggregation
(
AggregationBuilders
.
filter
(
"productAttrs"
,
QueryBuilders
.
termQuery
(
"attrValueList.type"
,
1
))
.
subAggregation
(
AggregationBuilders
.
terms
(
"attrIds"
)
...
...
Write
Preview
Supports
Markdown
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