コード例 #1
0
ファイル: BsRequestHeaderCB.java プロジェクト: liangkai/fess
 // ===================================================================================
 //                                                                               Build
 //                                                                               =====
 @Override
 public CountRequestBuilder build(CountRequestBuilder builder) {
   if (_conditionQuery != null) {
     QueryBuilder queryBuilder = _conditionQuery.getQuery();
     if (queryBuilder != null) {
       builder.setQuery(queryBuilder);
     }
   }
   return builder;
 }
コード例 #2
0
ファイル: BsRequestHeaderCB.java プロジェクト: liangkai/fess
  @Override
  public SearchRequestBuilder build(SearchRequestBuilder builder) {
    if (_conditionQuery != null) {
      QueryBuilder queryBuilder = _conditionQuery.getQuery();
      if (queryBuilder != null) {
        builder.setQuery(queryBuilder);
      }
      _conditionQuery
          .getFieldSortBuilderList()
          .forEach(
              sort -> {
                builder.addSort(sort);
              });
    }

    if (_specification != null) {
      builder.setFetchSource(
          _specification.columnList.toArray(new String[_specification.columnList.size()]), null);
    }

    return builder;
  }