19 lines
405 B
JavaScript
19 lines
405 B
JavaScript
import { uniqueId } from 'lodash';
|
|
|
|
function Client() {}
|
|
Client.prototype.index = function (params) {
|
|
var shardCount = 2;
|
|
return Promise.resolve({
|
|
_index: params.index || 'index',
|
|
_type: params.type || 'type',
|
|
_id: uniqueId('testDoc'),
|
|
_version: 1,
|
|
_shards: { total: shardCount, successful: shardCount, failed: 0 },
|
|
created: true
|
|
});
|
|
};
|
|
|
|
export default {
|
|
Client: Client
|
|
};
|