yangyoupeng

修复validateBulkInput的bug

...@@ -304,7 +304,7 @@ public class ESHttpClient { ...@@ -304,7 +304,7 @@ public class ESHttpClient {
304 } 304 }
305 305
306 private boolean validateBulkInput(List ids, List dataList) { 306 private boolean validateBulkInput(List ids, List dataList) {
307 - if(ids !=null || dataList != null){ 307 + if(ids ==null || dataList == null){
308 return false; 308 return false;
309 } 309 }
310 if(ids.size() != dataList.size() ){ 310 if(ids.size() != dataList.size() ){
...@@ -360,7 +360,7 @@ public class ESHttpClient { ...@@ -360,7 +360,7 @@ public class ESHttpClient {
360 }else { 360 }else {
361 for(Object object:dataList){ 361 for(Object object:dataList){
362 StringBuilder itemBuilder=new StringBuilder(); 362 StringBuilder itemBuilder=new StringBuilder();
363 - itemBuilder.append("{ \"create\" :").append("{ \"_index\" : \""). 363 + itemBuilder.append("{ \"index\" :").append("{ \"_index\" : \"").
364 append(this._index).append("\"").append(",\"_type\" :\"").append(this._type).append("\"") 364 append(this._index).append("\"").append(",\"_type\" :\"").append(this._type).append("\"")
365 //.append(",\"_id\" :\"").append(1).append("\"") 365 //.append(",\"_id\" :\"").append(1).append("\"")
366 .append("} }").append("\n"); 366 .append("} }").append("\n");
......