Skip to content

Commit

Permalink
change mapping of message field to ensure better searchability
Browse files Browse the repository at this point in the history
  • Loading branch information
jclausen committed Nov 19, 2023
1 parent a116ee8 commit ef774a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Changed
* Additional mapping enhancments for searchability
* Set default document bulk create to refresh only when requested
* Change explicit mapping of root message field to `text` to ensure search scoring ability

## Added
* Added `async` property to LogstashAppender
Expand Down
19 changes: 8 additions & 11 deletions models/logging/LogstashAppender.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -641,17 +641,6 @@ component
},
"mappings" : {
"dynamic_templates" : [
{
"message_field" : {
"path_match" : "message",
"match_mapping_type" : "string",
"mapping" : {
"type" : "text",
"norms" : false,
"fields" : { "keyword" : { "type" : "keyword", "ignore_above" : 1024 } }
}
}
},
{
"user_info_fields" : {
"path_match" : "user.info.*",
Expand Down Expand Up @@ -695,6 +684,14 @@ component
"extrainfo" : { "type" : "text" }
}
},
"message" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword", "ignore_above" : 512
}
}
},
"event" : {
"type" : "object",
"properties" : {
Expand Down

0 comments on commit ef774a5

Please sign in to comment.