Package org.elasticsearch.client

Examples of org.elasticsearch.client.Client.index()


                barrier1.await();
                barrier2.await();
                for (; counter < max; counter++) {
                    Client client = client(counter);
                    long id = idGenerator.incrementAndGet();
                    client.index(Requests.indexRequest().index("test").type("type1").id(Long.toString(id))
                            .source(XContentFactory.jsonBuilder().startObject()
                                    .field("num", id % fieldNumLimit)
                                    .endObject()))
                            .actionGet();
                }
View Full Code Here


                barrier1.await();
                barrier2.await();
                for (; counter < max; counter++) {
                    Client client = client(counter);
                    long id = idGenerator.incrementAndGet();
                    client.index(Requests.indexRequest().index("test").type("type1").id(Long.toString(id))
                            .source(XContentFactory.jsonBuilder().startObject()
                                    .field("num", id % fieldNumLimit)
                                    .endObject()))
                            .actionGet();
                }
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.