Package org.elasticsearch.action.index

Examples of org.elasticsearch.action.index.IndexRequest.create()


        );
    }

    private IndexRequest getSingleApiInsertRequest() {
        IndexRequest request = new IndexRequest("countries", "default");
        request.create(true);
        request.source(singleApiInsertSource);
        return request;
    }

    private BulkRequest getBulkApiInsertRequest() {
View Full Code Here


        if (routing != null) {
            indexRequest.routing(routing);
        }
        indexRequest.source(source, false);
        indexRequest.timestamp(Long.toString(System.currentTimeMillis()));
        indexRequest.create(allowCreateOnly);

        try {
            executeLock.acquire();
        } catch (InterruptedException e) {
            Thread.interrupted();
View Full Code Here

    protected IndexRequest buildIndexRequest(String index,
                                             BytesReference source,
                                             String id,
                                             @Nullable String routingValue) {
        IndexRequest request = new IndexRequest(index, Constants.DEFAULT_MAPPING_TYPE);
        request.create(true);
        request.source(source, false);
        request.id(id);
        request.routing(routingValue);

        return request;
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.