com.github.euler.elasticsearch.req.InsertRequestFactory Maven / Gradle / Ivy
package com.github.euler.elasticsearch.req;
import java.util.Map;
import org.elasticsearch.action.index.IndexRequest;
public class InsertRequestFactory implements ElasticSearchRequestFactory {
@Override
public IndexRequest create(String index, String id, Map source) {
IndexRequest req = new IndexRequest(index);
req.id(id);
req.source(source);
return req;
}
}