Path: redb-route/redb.Route.Elasticsearch/_SortCheck.cs Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.Elasticsearch/_SortCheck.cs ---- using Elastic.Clients.Elasticsearch; using Elastic.Clients.Elasticsearch.Core.MSearch; using Elastic.Clients.Elasticsearch.Core.Search; class SortCheck { void Check() { var body = new MultisearchBody(); // Sort is ICollection body.Sort = new List { new SortOptions { Field = new FieldSort { Field = "timestamp", Order = SortOrder.Desc } } }; // Source is SourceConfig body.Source = new SourceConfig(new SourceFilter { Includes = new Field[] { new Field("title"), new Field("author") } }); // Source with false (disable) body.Source = new SourceConfig(false); } }