node-elastical icon indicating copy to clipboard operation
node-elastical copied to clipboard

Add support for _id specification with client.index

Open bhedge opened this issue 9 years ago • 0 comments

Would like to have the option to specify an _id when creating an index.

The input could match the following:

client.index('index', 'type', 'my_id', {
     key1:"value 1",
     key2:"value 2"
}, function (err, res) {
    // `err` is an Error, or `null` on success.
    // `res` is the parsed ElasticSearch response data.
    if(err) {
        console.log(err);
    } else {
        console.log(res);
    }
});

bhedge avatar Mar 01 '15 22:03 bhedge