package cn.axzo.workflow.es.common.code;

import cn.axzo.framework.domain.web.code.IModuleRespCode;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * ES 相关操作响应码
 *
 * @author wangli
 * @since 2023/12/14 16:25
 */
@Getter
@AllArgsConstructor
public enum ElasticSearchRespCode implements IModuleRespCode {
    ES_SEARCH_ERROR("001", "ES 搜索时发生未知异常，信息: {}"),
    /**
     * 该异常的解决方式
     * PUT _cluster/settings
     * {
     * "transient": {
     * "search.allow_expensive_queries": "true"
     * }
     * }
     */
    ES_EXPENSIVE_QUERIES_NOT_SUPPORTED("002", "ES 集群设置不允许 expensive 查询."),
    ;

    private final String code;
    private final String message;

    @Override
    public String getModuleCode() {
        return "13";
    }

    @Override
    public String getProjectCode() {
        return "998";
    }

}
