Package org.elasticsearch.client.action.bulk

Examples of org.elasticsearch.client.action.bulk.BulkRequestBuilder.execute()


                        logger.warn("failed to add last_seq entry to bulk indexing");
                    }
                }

                try {
                    BulkResponse response = bulk.execute().actionGet();
                    if (response.hasFailures()) {
                        // TODO write to exception queue?
                        logger.warn("failed to execute" + response.buildFailureMessage());
                    }
                } catch (Exception e) {
View Full Code Here


            XContentBuilder source = createDoc(tweet);
            brb.add(Requests.indexRequest(indexName).type(getIndexType()).id(id).source(source));
        }
        if (brb.numberOfActions() > 0) {
//            System.out.println("actions:" + brb.numberOfActions());
            brb.execute().actionGet();
        }
    }

    public MyTweet findById(Long twitterId) {
        try {
View Full Code Here

      }//TESTED
     
      brb.add(ir);
    }
    brb.setConsistencyLevel(WriteConsistencyLevel.ONE);
    return brb.execute().actionGet();
  }//TESTED (including children and id hashmap)
 
  ///////////////////////////////////////////////////////////////////////////////////////
 
  public BulkResponse bulkAddDocuments(Collection<DBObject> docsJson, String idFieldName, String sParentId, boolean bAllowOverwrite)
View Full Code Here

      }//TESTED
     
      brb.add(ir);
    }
    brb.setConsistencyLevel(WriteConsistencyLevel.ONE);
    return brb.execute().actionGet();
  }//TESTED (including children and id hashmap)
 
  ///////////////////////////////////////////////////////////////////////////////////////

  // Encapsulation: Bulk delete documents
View Full Code Here

      }
      brb.add(dr);
    }
    brb.setConsistencyLevel(WriteConsistencyLevel.ONE);
   
    return brb.execute().actionGet();
  }//TESTED (inc children)
 
  ///////////////////////////////////////////////////////////////////////////////////////

  // Delete by query
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.