Skip to content

Commit 5be6c6a

Browse files
committed
Added const for event index search error field
1 parent 22ca089 commit 5be6c6a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Exceptionless.Core/Repositories/Configuration/Indexes/EventIndex.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ public sealed class Alias
307307
public const string LocationLevel2 = "level2";
308308
public const string LocationLocality = "locality";
309309

310+
public const string Error = "error";
310311
public const string ErrorCode = "error.code";
311312
public const string ErrorType = "error.type";
312313
public const string ErrorMessage = "error.message";
@@ -322,7 +323,7 @@ public static PropertiesDescriptor<PersistentEvent> AddCopyToMappings(this Prope
322323
return descriptor
323324
.Text(f => f.Name(EventIndex.Alias.IpAddress).Analyzer(EventIndex.COMMA_WHITESPACE_ANALYZER))
324325
.Text(f => f.Name(EventIndex.Alias.OperatingSystem).Analyzer(EventIndex.WHITESPACE_LOWERCASE_ANALYZER).AddKeywordField())
325-
.Object<object>(f => f.Name("error").Properties(p1 => p1
326+
.Object<object>(f => f.Name(EventIndex.Alias.Error).Properties(p1 => p1
326327
.Keyword(f3 => f3.Name("code").IgnoreAbove(1024))
327328
.Text(f3 => f3.Name("message").AddKeywordField())
328329
.Text(f3 => f3.Name("type").Analyzer(EventIndex.TYPENAME_ANALYZER).SearchAnalyzer(EventIndex.WHITESPACE_LOWERCASE_ANALYZER).AddKeywordField())

src/Exceptionless.Core/Repositories/EventRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public EventRepository(ExceptionlessElasticConfiguration configuration, AppOptio
2626
// copy to fields
2727
AddDefaultExclude(EventIndex.Alias.IpAddress);
2828
AddDefaultExclude(EventIndex.Alias.OperatingSystem);
29-
AddDefaultExclude("error");
29+
AddDefaultExclude(EventIndex.Alias.Error);
3030

3131
AddPropertyRequiredForRemove(e => e.Date);
3232
}

0 commit comments

Comments
 (0)