Skip to content

Commit

Permalink
Revert "feat(elastic): map Id onto hits id"
Browse files Browse the repository at this point in the history
This reverts commit 50e6fff.
  • Loading branch information
followynne committed Aug 17, 2024
1 parent 3c1a9e1 commit c5f0b0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ public class ElasticSearchDbDataProvider(IElasticClient client, ElasticSearchDbO

int.TryParse(result?.Total.ToString(), out var total);

return (result?.Hits
.Select((x, index) => x.Source.ToLogModel(rowNoStart, index, x.Id))
.ToList() ?? [], total);
return (result?.Documents.Select((x, index) => x.ToLogModel(rowNoStart, index)).ToList() ?? [], total);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ namespace Serilog.Ui.ElasticSearchProvider
{
public class ElasticSearchDbLogModel
{
public string? Id { get; set; }

[JsonProperty("level")]
public string? Level { get; set; }

Expand All @@ -25,11 +23,10 @@ public class ElasticSearchDbLogModel
[JsonProperty("fields")]
public Dictionary<string, object>? Fields { get; set; }

internal LogModel ToLogModel(int rowNoStart, int index, string hitIndex)
internal LogModel ToLogModel(int rowNoStart, int index)
{
return new LogModel
{
Id = hitIndex,
Level = Level,
Message = Message,
Timestamp = Timestamp.ToUniversalTime(),
Expand Down

0 comments on commit c5f0b0f

Please sign in to comment.