Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full coverage of ECS by ecs@mappings when date_detection is disabled #112444

Merged
merged 6 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/changelog/112444.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 112444
summary: Full coverage of ECS by ecs@mappings when `date_detection` is disabled
area: Mapping
type: bug
issues:
- 112398
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@
"ingested",
"*.ingested",
"*.start",
"*.end"
"*.end",
"*.indicator.first_seen",
"*.indicator.last_seen",
"*.indicator.modified_at",
"threat.enrichments.matched.occurred"
],
"unmatch_mapping_type": "object"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,14 @@ public void testFlattenedFieldsWithoutSubobjects() throws IOException {
verifyEcsMappings(indexName);
}

public void testWithDateDetectionDisabled() throws IOException {
eyalkoren marked this conversation as resolved.
Show resolved Hide resolved
String indexName = "test_date_detection_false";
createTestIndex(indexName, Map.of("date_detection", false));
Map<String, Object> flattenedFieldsMap = createTestDocument(true);
indexDocument(indexName, flattenedFieldsMap);
verifyEcsMappings(indexName);
}

public void testNestedFields() throws IOException {
String indexName = "test-nested-fields";
createTestIndex(indexName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class StackTemplateRegistry extends IndexTemplateRegistry {

// The stack template registry version. This number must be incremented when we make changes
// to built-in templates.
public static final int REGISTRY_VERSION = 13;
public static final int REGISTRY_VERSION = 14;

public static final String TEMPLATE_VERSION_VARIABLE = "xpack.stack.template.version";
public static final Setting<Boolean> STACK_TEMPLATES_ENABLED = Setting.boolSetting(
Expand Down