且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

FlexibleSearchQuery响应无数据

更新时间:2023-02-02 21:44:59

根据您的定义,我认为您的问题与Restrections有关:限制是FlexibleSearch遵守的规则,该规则允许根据搜索类型限制搜索结果搜索以及当前登录的用户

I think that the problem in your case is related to Restrections, by definition : Restrictions are rules obeyed by FlexibleSearch which allow to limit search results depending on which type is searched and which user is currently logged in

因此请尝试在调用灵活搜索之前禁用搜索限制

so try to Disable search restrictions before calling your flexible seach

import de.hybris.platform.search.restriction.SearchRestrictionService;
...
// Disable search restrictions
searchRestrictionService.disableSearchRestrictions();
// some query goes here

// Enable search restrictions
searchRestrictionService.enableSearchRestrictions();
// some query goes here

另一方面,当您使用hac>Console>Flexible Search时,我假设您以admin身份登录,因此默认情况下,在Hybris Flexible搜索中所有限制都处于禁用状态

In other hand , when you use hac>Console>Flexible Search i suppose that you log as admin , so all restrictions are disabled by default in Hybris Flexible search

您可以搜索HMC中的所有活动限制,方法是搜索类型:SearchRestriction,查看followinf屏幕截图

You can check all actives restrctions in HMC, by searchig the type : SearchRestriction , look the followinf screenshot

请参阅: https://help.hybris.com/6.3.0 /hcd/8c428f8286691014970ceee87aa01605.html