public static SearchRequest setSearchRequest(BaseSideInfo sideInfo) {

        SearchRequest searchRequest = new SearchRequest();
        Elasticsearch7SideTableInfo tableInfo = (Elasticsearch7SideTableInfo)sideInfo.getSideTableInfo();
        // determine existence of index
        String index = tableInfo.getIndex();
        if (!StringUtils.isEmpty(index) || index.trim().length() > 0) {
            // strip leading and trailing spaces from a string
            String[] indexes = StringUtils.split(index, ",");
            for (int i = 0; i< indexes.length; i++) {
                indexes[i] = indexes[i].trim();
            }
            searchRequest.indices(indexes);
        }

        return searchRequest;
    }
@description:
@program: flink.sql
@author: lany
@create: 2021/01/11 10:23
elasticsearch7/elasticsearch7-side/elasticsearch7-side-core/src/main/java/com/dtstack/flink/sql/side/elasticsearch7/util/Es7Util.java