Skip to content

Commit

Permalink
Start indexing documents by default (#62159)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecote authored Apr 2, 2020
1 parent 6d8bdf6 commit 7039aba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/event_log/generated/mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ignore_above": 1024,
"type": "keyword",
"meta": {
"isArray": true
"isArray": "true"
}
},
"message": {
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/event_log/scripts/create_schemas.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function augmentMappings(mappings, multiValuedProperties) {
const fullProp = replaceDotWithProperties(prop);
const metaPropName = `${fullProp}.meta`;
const meta = lodash.get(mappings.properties, metaPropName) || {};
meta.isArray = true;
meta.isArray = 'true';
lodash.set(mappings.properties, metaPropName, meta);
}
}
Expand All @@ -127,7 +127,7 @@ function generateSchemaLines(lineWriter, prop, mappings) {
if (mappings == null) return;

if (StringTypes.has(mappings.type)) {
if (mappings.meta && mappings.meta.isArray) {
if (mappings.meta && mappings.meta.isArray === 'true') {
lineWriter.addLine(`${propKey}: ecsStringMulti(),`);
} else {
lineWriter.addLine(`${propKey}: ecsString(),`);
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/event_log/server/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { IEvent } from '../generated/schemas';
export const ConfigSchema = schema.object({
enabled: schema.boolean({ defaultValue: true }),
logEntries: schema.boolean({ defaultValue: false }),
indexEntries: schema.boolean({ defaultValue: false }),
indexEntries: schema.boolean({ defaultValue: true }),
});

export type IEventLogConfig = TypeOf<typeof ConfigSchema>;
Expand Down

0 comments on commit 7039aba

Please sign in to comment.