赞
踩
searchSourceBuilder.query(QueryBuilders.matchQuery(“_id”, “SvjgP24BndtcmnpzbiuL”));
searchSourceBuilder.size(2);
searchRequest.source(searchSourceBuilder);
SearchResponse searchResponse = highLevelClient.search(searchRequest, RequestOptions.DEFAULT);
SearchHit[] searchHits = searchResponse.getHits().getHits();
for(SearchHit s:searchHits){
String docId = s.getId();
UpdateRequest request = new UpdateRequest(“sub_bank1031”,“sub_bank”,docId);
request.doc(“{“aliasName”:“中国农业发展银行林州市支行444”,“bankType”:“ADB”,“bankTypeName”:“中国农业发展银行”,“cityId”:“410500”,“cityName”:“安阳市”,“createTime”:1515719190000,“createUser”:“system”,“id”:“000238a326b044e9ae10cfe4298f4c44”,“isEnabled”:“1”,“name”:“中国农业发展银行林州市支行”,“provinceId”:“410000”,“provinceName”:“河南省”,“unionNumber”:“203496100010”}”, XContentType.JSON);
UpdateResponse resp = highLevelClient.update(request, RequestOptions.DEFAULT);
println(resp.getResul
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。