返回默认的elasticsearch客户端工具api，单例模式，多线程安全
@return
324498
public ClientInterface getRestClientUtil() {

		if(detaultClientInterface == null) {
			if (restClient != null) {
				synchronized (this) {
					if(detaultClientInterface != null)
						return detaultClientInterface;
					return detaultClientInterface = this.restClient.getClientUtil(this.indexNameBuilder);
				}
			}
			else
				return null;
		}
		else {
			return detaultClientInterface;
		}
	}
343419
public SensitiveWordStatusResult getSensitiveWordStatus() throws APIConnectionException, APIRequestException {
        ResponseWrapper responseWrapper = _httpClient.sendGet(_baseUrl + sensitiveWordPath + "/status");
        return _gson.fromJson(responseWrapper.responseContent, SensitiveWordStatusResult.class);
    }
1315412
private String getApiIndex(Api api) {
        return getApiIndex(api.getOrganizationId(), api.getApiId(), api.getVersion());
    }
97741
public  <T> ESDatas<T> searchAll(String index,  int fetchSize ,Class<T> type) throws ElasticSearchException{
		return searchAll(index,  fetchSize ,(ScrollHandler<T>) null,type);
	}
277026
public Map<String, String> toMap(){
		Map<String, String> ret = new HashMap<>();
		ret.put("id", this.getID());
		ret.put("version", this.getVersion().toString());
		return ret;
	}
218443
public <T> T getDocument(String indexName, String indexType,String documentId,Map<String,Object> options,Class<T> beanType) throws ElasticSearchException{
		try{
			SearchHit searchResult = this.client.executeRequest(BuildTool.buildGetDocumentRequest(  indexName,   indexType,  documentId,  options),null,   new GetDocumentResponseHandler( beanType),ClientUtil.HTTP_GET);

			return ResultUtil.buildObject(searchResult, beanType);
		}
		catch(ElasticSearchException e){
			return ResultUtil.hand404HttpRuntimeException(e,beanType,ResultUtil.OPERTYPE_getDocument);
		}

	}
300944
public String getDocument(String indexName, String indexType,String documentId,Map<String,Object> options) throws ElasticSearchException{
		try {
			return this.client.executeHttp(BuildTool.buildGetDocumentRequest(indexName, indexType, documentId, options), ClientUtil.HTTP_GET);
		}
		catch(ElasticSearchException e){
			return ResultUtil.hand404HttpRuntimeException(e,String.class,ResultUtil.OPERTYPE_getDocument);
		}
	}
87491
public ApiSuccessResponse searchInteractions(LuceneSearchInteractionData luceneSearchInteractionData) throws ApiException {
        ApiResponse<ApiSuccessResponse> resp = searchInteractionsWithHttpInfo(luceneSearchInteractionData);
        return resp.getData();
    }
703347
public Map<String, String> toMap() {
		Element root = doc.getDocumentElement();
		Map<String, String> params = new HashMap<String, String>();

		// 将节点封装成map形式
		NodeList list = root.getChildNodes();
		for (int i = 0; i < list.getLength(); i++) {
			Node node = list.item(i);
			params.put(node.getNodeName(), node.getTextContent());
		}
		// 含有空白符会生成一个#text参数
		params.remove("#text");
		return params;
	}
61433
@Override
	public SqlElasticSearchRequestBuilder explain() throws SqlParseException {
        Hint scrollHint = null;
        for (Hint hint : select.getHints()) {
            if (hint.getType() == HintType.USE_SCROLL) {
                scrollHint = hint;
                break;
            }
        }
        if (scrollHint != null && scrollHint.getParams()[0] instanceof String) {
            return new SqlElasticSearchRequestBuilder(new SearchScrollRequestBuilder(client, SearchScrollAction.INSTANCE, (String) scrollHint.getParams()[0]).setScroll(new TimeValue((Integer) scrollHint.getParams()[1])));
        }

		/*
		zhongshu-comment 6.1.1.5这个版本和elastic6.1.1这个分支用的是这一行代码
		但是在本地调试时我的client没有实例化，并没有去连es，所以这行代码会报空指针
		那就将这行注释掉吧，以后就用下面那行
		 */
//		this.request = client.prepareSearch();

		/*
		zhongshu-comment  6.2.4.1这个版本和master_zhongshu_dev_01用的是这一行代码，虽然client为null，但是下面这行代码并不会报空指针
							为了在本地调试、执行下文的那些代码获得es的dsl，所以就使用这行代码，暂时将上面哪一行注释掉，上线的时候记得替换掉
		变量request是es搜索请求对象，调用的是es的api，SearchRequestBuilder是es的原生api
		 */
        this.request = new SearchRequestBuilder(client, SearchAction.INSTANCE);
		setIndicesAndTypes();

		//zhongshu-comment 将Select对象中封装的sql token信息转换并传到成员变量es搜索请求对象request中
		setFields(select.getFields());

		setWhere(select.getWhere());
		setSorts(select.getOrderBys());
		setLimit(select.getOffset(), select.getRowCount());

        //
        if (scrollHint != null) {
            if (!select.isOrderdSelect())
                request.addSort(FieldSortBuilder.DOC_FIELD_NAME, SortOrder.ASC);
            request.setSize((Integer) scrollHint.getParams()[0]).setScroll(new TimeValue((Integer) scrollHint.getParams()[1]));
        } else {
            request.setSearchType(SearchType.DFS_QUERY_THEN_FETCH);
        }
        updateRequestWithIndexAndRoutingOptions(select, request);
		updateRequestWithHighlight(select, request);
		updateRequestWithCollapse(select, request);
		updateRequestWithPostFilter(select, request);
		updateRequestWithStats(select, request);
		SqlElasticSearchRequestBuilder sqlElasticRequestBuilder = new SqlElasticSearchRequestBuilder(request);

		return sqlElasticRequestBuilder;
	}
1067941
public Map<String, List<String>> getQueryString() {
    if (querystring == null) {
      try {
        querystring = new QueryStringDecoder(request.getUri()).getParameters();
      } catch (IllegalArgumentException e) {
        throw new BadRequestException("Bad query string: " + e.getMessage());
      }
    }
    return querystring;
  }
1222013
public Map<String, Object> toMap() {
        Map<String, Object> result = new HashMap<>();
        for (Entry<Key, Value> keyValueEntry : fields.entrySet()) {
            Key key = keyValueEntry.getKey();
            Value value = keyValueEntry.getValue();
            if (!key.isExtension()) {
                result.put(key.getName(), transformValueToObject(value));
            } else {
                result.put("(" + key.getName() + ")", transformValueToObject(value));
            }
        }
        return result;
    }
385741
public java.util.List<String> getElasticGpuIds() {
        if (elasticGpuIds == null) {
            elasticGpuIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return elasticGpuIds;
    }
1059776
public java.util.List<ElasticGpus> getElasticGpuSet() {
        if (elasticGpuSet == null) {
            elasticGpuSet = new com.amazonaws.internal.SdkInternalList<ElasticGpus>();
        }
        return elasticGpuSet;
    }
1073812
public function buildMappingInformation()
    {
        if (!$this->client instanceof Model\Client) {
            throw new ElasticSearchException('No client was given for mapping retrieval. Set a client BackendMappingBuilder->setClient().', 1339678111);
        }

        $this->indicesWithoutTypeInformation = [];

        $response = $this->client->request('GET', '/_mapping');
        $mappingInformation = new MappingCollection(MappingCollection::TYPE_BACKEND);
        $mappingInformation->setClient($this->client);
        $indexNames = $this->indexInformer->getAllIndexNames();

        foreach ($response->getTreatedContent() as $indexName => $indexSettings) {
            if (!in_array($indexName, $indexNames)) {
                continue;
            }
            $index = new Model\Index($indexName);
            if (empty($indexSettings)) {
                $this->indicesWithoutTypeInformation[] = $indexName;
            }
            foreach ($indexSettings as $typeName => $typeSettings) {
                $type = new Model\GenericType($index, $typeName);
                $mapping = new Model\Mapping($type);
                if (isset($typeSettings['properties'])) {
                    foreach ($typeSettings['properties'] as $propertyName => $propertySettings) {
                        foreach ($propertySettings as $key => $value) {
                            $mapping->setPropertyByPath([$propertyName, $key], $value);
                        }
                    }
                }
                $mappingInformation->add($mapping);
            }
        }

        return $mappingInformation;
    }
698758
public static  Client getClient(String elasticSearch){
		JavaElasticSearch elasticSearchSink = (JavaElasticSearch)getElasticSearchSink( elasticSearch);
		return elasticSearchSink.getClient();
	}
704716
public URL getIndexPage() {
        // In the current impl dependencies are checked first, so the plugin itself
        // will add the last entry in the getResources result.
        URL idx = null;
        try {
            Enumeration<URL> en = classLoader.getResources("index.jelly");
            while (en.hasMoreElements())
                idx = en.nextElement();
        } catch (IOException ignore) { }
        // In case plugin has dependencies but is missing its own index.jelly,
        // check that result has this plugin's artifactId in it:
        return idx != null && idx.toString().contains(shortName) ? idx : null;
    }