mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Better doc IDs and a descriptive variable name
This commit is contained in:
parent
417d8a3e34
commit
b85952f69e
1 changed files with 3 additions and 2 deletions
|
@ -48,7 +48,7 @@ export function registerData(server) {
|
|||
push(null, doc);
|
||||
}
|
||||
else {
|
||||
push(null, {index: _.isEmpty(fileName) ? {} : {_id: `L${currentLine} - ${fileName}`}});
|
||||
push(null, {index: _.isEmpty(fileName) ? {} : {_id: `${fileName}:${currentLine}`}});
|
||||
push(null, doc);
|
||||
currentLine++;
|
||||
next();
|
||||
|
@ -73,7 +73,8 @@ export function registerData(server) {
|
|||
return _.reduce(response.items, (memo, docResponse) => {
|
||||
const indexResult = docResponse.index;
|
||||
if (indexResult.error) {
|
||||
if (_.isUndefined(_.get(memo, 'errors.index'))) {
|
||||
const hasIndexingErrors = _.isUndefined(_.get(memo, 'errors.index'));
|
||||
if (hasIndexingErrors) {
|
||||
_.set(memo, 'errors.index', []);
|
||||
}
|
||||
memo.errors.index.push(_.pick(indexResult, ['_id', 'error']));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue