Examples of IndexRequest


Examples of org.elasticsearch.action.index.IndexRequest

    @VisibleForTesting
    protected BulkRequest createBulkRequest(List<Message> msgList) {
        final BulkRequest request = new BulkRequest();
        for (Message m : msgList) {
            IndexRequest indexRequest = createIndexRequest(m);
            if (indexRequest != null) {
                request.add(indexRequest, m);
            }
        }
        return request;
View Full Code Here

Examples of org.elasticsearch.action.index.IndexRequest

    @Override
    public void store(String type, long timestamp, String jsonData) {
        Date ts = new Date(timestamp);
        Date utc = new Date(ts.getTime() + ts.getTimezoneOffset() * 60000);
        IndexRequest ir = new IndexRequest()
                .index("insight-"+ indexFormat.format(utc))
                .type(type)
                .source(jsonData)
                .create(true);
        queue.add(ir);
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.