on 2022 Aug 08 11:17 PM
I want to export to Excel the result of a product search returning about 80000 items. After export process is completed, I download the Excel file but it only contains 50 items which is the number of items shown in a single page. I do not select individual items on my product search. I also get the prompt saying that I am about to export 80000 items. If Hybris knows that I am exporting 80000 items then why does it only export 50. There are no error in the console log.
I am on version 2011.22
Request clarification before answering.
I faced the same problem with version 1905.43. I found that in method getAllResults() of DefaultPlatformFieldSearchFacadeStrategy.BackofficeFlexibleSearchPageable, the green line should use clonedQuery instead of query according to previous version. I'm thinking that this might be a bug from SAP upgrade.

Maybe this will help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are right on! The implementation did change on patch 22 reverting to query as opposed to using clonedQuery as it is the case for patch 22. I will raise a SAP ticket. Thanks!
Hybris 2011.21:
public List<T> getAllResults() {
GenericSearchQuery clonedQuery = new GenericSearchQuery(this.query.getQuery());
clonedQuery.setStart(0);
clonedQuery.setCount(this.getTotalCount());
clonedQuery.setNeedTotal(false);
if (DefaultPlatformFieldSearchFacadeStrategy.this.typeService.getTypeForCode(this.getTypeCode()) instanceof ViewTypeModel) {
SearchResult jaloSearchResult = JaloSession.getCurrentSession().search(clonedQuery.getQuery());
return jaloSearchResult != null ? jaloSearchResult.getResult() : Collections.emptyList();
} else {
de.hybris.platform.servicelayer.search.SearchResult<T> searchResult = DefaultPlatformFieldSearchFacadeStrategy.this.getGenericSearchService().search(clonedQuery);
return searchResult != null ? searchResult.getResult() : Collections.emptyList();
}
}Hybris 2011.22:
public List<T> getAllResults() {
GenericSearchQuery clonedQuery = new GenericSearchQuery(this.query.getQuery());
clonedQuery.setStart(0);
clonedQuery.setCount(this.getTotalCount());
clonedQuery.setNeedTotal(false);
if (this.this$0.typeService.getTypeForCode(this.getTypeCode()) instanceof ViewTypeModel) {
SearchResult jaloSearchResult = JaloSession.getCurrentSession().search(clonedQuery.getQuery());
return jaloSearchResult != null ? jaloSearchResult.getResult() : Collections.emptyList();
} else {
de.hybris.platform.servicelayer.search.SearchResult<T> searchResult = this.searchWithReadReplicaIfPossible(this.query);
return searchResult != null ? searchResult.getResult() : Collections.emptyList();
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.