Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix relatebugs #588

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

JerryFoundation
Copy link

在mall-search/src/main/java/com/macro/mall/search/service/impl/EsProductServiceImpl.java中
如果当 /search/relate 请求参数为空的时候, 会直接导致((ParsedTerms) ((ParsedFilter) ((ParsedNested) productAttrs).getAggregations().get("productAttrs")).getAggregations().get("attrIds")).getBuckets() 类型为ParsedStringTerms 而非 ParsedLongTerms , 进而导致强转失败

现将ParsedLongTerms 使用父类ParsedTerms 强转,就可以避免类型问题了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant