packages/teraslice/lib/cluster/storage/backends/elasticsearch_store.js
function create(record, indexArg = indexName) {
        logger.trace('creating record', logRecord ? record : null);

        const query = {
            index: indexArg,
            type: recordType,
            id: record[idField],
            body: record,
            refresh: forceRefresh
        };

        return elasticsearch.create(query);
    }
function create(record, indexArg = indexName) {
        logger.trace('creating record', logRecord ? record : null);

        const query = {
            index: indexArg,
            type: recordType,
            id: record[idField],
            body: record,
            refresh: forceRefresh
        };

        return elasticsearch.create(query);
    }
/*
Create saves a record to elasticsearch under the provided id.
If the record already exists it will not be inserted.