added ms as a possible interval unit
This commit is contained in:
@ -2563,7 +2563,7 @@ api.indices.prototype.flush = ca({
|
||||
});
|
||||
|
||||
/**
|
||||
* Perform a [indices.flushSynced](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html) request
|
||||
* Perform a [indices.flushSynced](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush.html) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
|
||||
|
||||
@ -125,7 +125,7 @@ var castType = {
|
||||
} else {
|
||||
throw new TypeError(
|
||||
'Invalid ' + name + ': expected a number or interval ' +
|
||||
'(an integer followed by one of Mwdhmsy).'
|
||||
'(an integer followed by one of M, w, d, h, m, s, y or ms).'
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
@ -208,7 +208,7 @@ utils.isNumeric = function (val) {
|
||||
};
|
||||
|
||||
// regexp to test for intervals
|
||||
var intervalRE = /^(\d+(?:\.\d+)?)([Mwdhmsy])$/;
|
||||
var intervalRE = /^(\d+(?:\.\d+)?)(M|w|d|h|m|s|y|ms)$/;
|
||||
|
||||
/**
|
||||
* Test if a string represents an interval (eg. 1m, 2Y)
|
||||
|
||||
Reference in New Issue
Block a user