Search in sources :

Example 1 with BoostDocPager

use of org.codelibs.fess.app.pager.BoostDocPager in project fess by codelibs.

the class ApiAdminBoostdocAction method settings.

// ===================================================================================
//                                                                      Search Execute
//                                                                      ==============
// GET /api/admin/boostdoc
// POST /api/admin/boostdoc
@Execute
public JsonResponse<ApiResult> settings(final SearchBody body) {
    validateApi(body, messages -> {
    });
    final BoostDocPager pager = copyBeanToNewBean(body, BoostDocPager.class);
    final List<BoostDocumentRule> list = boostDocumentRuleService.getBoostDocumentRuleList(pager);
    return asJson(new ApiConfigsResponse<EditBody>().settings(list.stream().map(entity -> createEditBody(entity)).collect(Collectors.toList())).total(pager.getAllRecordCount()).status(Status.OK).result());
}
Also used : BoostDocumentRule(org.codelibs.fess.es.config.exentity.BoostDocumentRule) AdminBoostdocAction.getBoostDocumentRule(org.codelibs.fess.app.web.admin.boostdoc.AdminBoostdocAction.getBoostDocumentRule) BoostDocPager(org.codelibs.fess.app.pager.BoostDocPager) Execute(org.lastaflute.web.Execute)

Aggregations

BoostDocPager (org.codelibs.fess.app.pager.BoostDocPager)1 AdminBoostdocAction.getBoostDocumentRule (org.codelibs.fess.app.web.admin.boostdoc.AdminBoostdocAction.getBoostDocumentRule)1 BoostDocumentRule (org.codelibs.fess.es.config.exentity.BoostDocumentRule)1 Execute (org.lastaflute.web.Execute)1