-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[Logs+] Change default of ignore_malformed to true in logs-*-* data streams
#95329
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
Merged
felixbarny
merged 9 commits into
elastic:main
from
eyalkoren:logs-data-streams-ignore_malformed
Apr 27, 2023
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5cb8d3d
[Logs+] Change default of ignore_malformed to true in logs-*-* data s…
eyalkoren 21d1d74
Merge remote-tracking branch 'upstream/main' into logs-data-streams-i…
eyalkoren 15c5f24
Remove redundant mapping
eyalkoren 570560b
Add @timestamp mapping exception in logs-mappings.json
eyalkoren 2887001
Update docs/changelog/95329.yaml
eyalkoren d81b782
Adjust changlog entry
eyalkoren 0bdb3c2
Update docs/changelog/95329.yaml
eyalkoren 92acc54
Apply review suggestions
eyalkoren f1de318
Merge remote-tracking branch 'eyalkoren/logs-data-streams-ignore_malf…
eyalkoren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
111 changes: 111 additions & 0 deletions
111
...rc/yamlRestTest/resources/rest-api-spec/test/data_stream/200_logs_datastream_defaults.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| --- | ||
| Verify default logs-*-* settings and mappings: | ||
| - do: | ||
| indices.create_data_stream: | ||
| name: logs-test-1 | ||
| - is_true: acknowledged | ||
|
|
||
| - do: | ||
| indices.get_data_stream: | ||
| name: logs-test-1 | ||
| - set: { data_streams.0.indices.0.index_name: idx0name } | ||
|
|
||
| # default backing index settings should be "ignore_malformed": true | ||
| - do: | ||
| indices.get_settings: | ||
| index: $idx0name | ||
| - match: { .$idx0name.settings.index.mapping.ignore_malformed: "true" } | ||
|
|
||
| # add test field mapping | ||
| - do: | ||
| indices.put_mapping: | ||
| index: $idx0name | ||
| body: | ||
| properties: | ||
| numeric_field: | ||
| type: integer | ||
| - is_true: acknowledged | ||
|
|
||
| # default backing index mapping should contain an exception for the @timestamp field - "ignore_malformed": false | ||
| - do: | ||
| indices.get_mapping: | ||
| index: $idx0name | ||
| - match: { [email protected]_malformed: false } | ||
| - match: { .$idx0name.mappings.properties.numeric_field.type: "integer" } | ||
|
|
||
| - do: | ||
| index: | ||
| index: logs-test-1 | ||
| refresh: true | ||
| body: | ||
| '@timestamp': '2023-04-18' | ||
| message: 'valid' | ||
| numeric_field: 42 | ||
| - match: {result: "created"} | ||
|
|
||
| - do: | ||
| index: | ||
| index: logs-test-1 | ||
| refresh: true | ||
| body: | ||
| '@timestamp': '2023-04-18' | ||
| message: 'invalid_type_valid_value' | ||
eyalkoren marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| numeric_field: "42" | ||
| - match: {result: "created"} | ||
|
|
||
| - do: | ||
| index: | ||
| index: logs-test-1 | ||
| refresh: true | ||
| body: | ||
| '@timestamp': '2023-04-18' | ||
| message: 'invalid_type_invalid_value' | ||
| numeric_field: "forty-two" | ||
| - match: {result: "created"} | ||
|
|
||
| - do: | ||
eyalkoren marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| search: | ||
| index: logs-test-1 | ||
| body: | ||
| query: | ||
| match: | ||
eyalkoren marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| message: | ||
| query: 'valid' | ||
| fuzziness: '0' | ||
| fields: | ||
| - field: 'numeric_field' | ||
| - length: { hits.hits: 1 } | ||
| - length: { hits.hits.0.fields: 1 } | ||
| - match: { hits.hits.0.fields.numeric_field.0: 42 } | ||
|
|
||
| - do: | ||
| search: | ||
| index: logs-test-1 | ||
| body: | ||
| query: | ||
| match: | ||
| message: | ||
| query: 'invalid_type_valid_value' | ||
| fuzziness: '0' | ||
| fields: | ||
| - field: 'numeric_field' | ||
| - length: { hits.hits: 1 } | ||
| - length: { hits.hits.0.fields: 1 } | ||
| - match: { hits.hits.0.fields.numeric_field.0: 42 } | ||
|
|
||
| - do: | ||
| search: | ||
| index: logs-test-1 | ||
| body: | ||
| query: | ||
| match: | ||
| message: | ||
| query: 'invalid_type_invalid_value' | ||
| fuzziness: '0' | ||
| fields: | ||
| - field: 'numeric_field' | ||
| - length: { hits.hits: 1 } | ||
| - length: { hits.hits.0._ignored: 1 } | ||
| - match: { hits.hits.0._ignored.0: 'numeric_field' } | ||
| - length: { hits.hits.0.ignored_field_values.numeric_field: 1 } | ||
| - match: { hits.hits.0.ignored_field_values.numeric_field.0: 'forty-two' } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.