Skip to content

Commit

Permalink
Added const for event index search error field
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Dec 20, 2024
1 parent 22ca089 commit 5be6c6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ public sealed class Alias
public const string LocationLevel2 = "level2";
public const string LocationLocality = "locality";

public const string Error = "error";
public const string ErrorCode = "error.code";
public const string ErrorType = "error.type";
public const string ErrorMessage = "error.message";
Expand All @@ -322,7 +323,7 @@ public static PropertiesDescriptor<PersistentEvent> AddCopyToMappings(this Prope
return descriptor
.Text(f => f.Name(EventIndex.Alias.IpAddress).Analyzer(EventIndex.COMMA_WHITESPACE_ANALYZER))
.Text(f => f.Name(EventIndex.Alias.OperatingSystem).Analyzer(EventIndex.WHITESPACE_LOWERCASE_ANALYZER).AddKeywordField())
.Object<object>(f => f.Name("error").Properties(p1 => p1
.Object<object>(f => f.Name(EventIndex.Alias.Error).Properties(p1 => p1
.Keyword(f3 => f3.Name("code").IgnoreAbove(1024))
.Text(f3 => f3.Name("message").AddKeywordField())
.Text(f3 => f3.Name("type").Analyzer(EventIndex.TYPENAME_ANALYZER).SearchAnalyzer(EventIndex.WHITESPACE_LOWERCASE_ANALYZER).AddKeywordField())
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptionless.Core/Repositories/EventRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public EventRepository(ExceptionlessElasticConfiguration configuration, AppOptio
// copy to fields
AddDefaultExclude(EventIndex.Alias.IpAddress);
AddDefaultExclude(EventIndex.Alias.OperatingSystem);
AddDefaultExclude("error");
AddDefaultExclude(EventIndex.Alias.Error);

AddPropertyRequiredForRemove(e => e.Date);
}
Expand Down

0 comments on commit 5be6c6a

Please sign in to comment.