|
@@ -162,13 +162,16 @@ public class SearchHelper {
|
|
|
final FessConfig fessConfig = ComponentUtil.getFessConfig();
|
|
|
final QueryHelper queryHelper = ComponentUtil.getQueryHelper();
|
|
|
final QueryFieldConfig queryFieldConfig = ComponentUtil.getQueryFieldConfig();
|
|
|
+ final int pageSize = params.getPageSize();
|
|
|
+ LaRequestUtil.getOptionalRequest().ifPresent(request -> {
|
|
|
+ request.setAttribute(Constants.REQUEST_PAGE_SIZE, pageSize);
|
|
|
+ });
|
|
|
return ComponentUtil.getSearchEngineClient().search(fessConfig.getIndexDocumentSearchIndex(), searchRequestBuilder -> {
|
|
|
queryHelper.processSearchPreference(searchRequestBuilder, userBean, query);
|
|
|
- return SearchConditionBuilder.builder(searchRequestBuilder).query(query).offset(params.getStartPosition())
|
|
|
- .size(params.getPageSize()).facetInfo(params.getFacetInfo()).geoInfo(params.getGeoInfo())
|
|
|
- .highlightInfo(params.getHighlightInfo()).similarDocHash(params.getSimilarDocHash())
|
|
|
- .responseFields(queryFieldConfig.getResponseFields()).searchRequestType(params.getType())
|
|
|
- .trackTotalHits(params.getTrackTotalHits()).build();
|
|
|
+ return SearchConditionBuilder.builder(searchRequestBuilder).query(query).offset(params.getStartPosition()).size(pageSize)
|
|
|
+ .facetInfo(params.getFacetInfo()).geoInfo(params.getGeoInfo()).highlightInfo(params.getHighlightInfo())
|
|
|
+ .similarDocHash(params.getSimilarDocHash()).responseFields(queryFieldConfig.getResponseFields())
|
|
|
+ .searchRequestType(params.getType()).trackTotalHits(params.getTrackTotalHits()).build();
|
|
|
}, (searchRequestBuilder, execTime, searchResponse) -> {
|
|
|
searchResponse.ifPresent(r -> {
|
|
|
if (r.getTotalShards() != r.getSuccessfulShards() && fessConfig.isQueryTimeoutLogging()) {
|