add sort support to search, add index fields command, fix error messages (#25)

This commit is contained in:
T. von Dein
2026-06-01 12:30:41 +02:00
parent f1877c6903
commit 504db9835d
19 changed files with 233 additions and 63 deletions

View File

@@ -100,6 +100,19 @@ func Search(conf *cfg.Config) *cli.Command {
Destination: &conf.TimestampFormat,
Value: "strict_date_hour_minute",
},
&cli.StringFlag{
Name: "sort-by",
Usage: "sort by a field",
Destination: &conf.SortBy,
Value: "@timestamp",
Aliases: []string{"k"},
},
&cli.BoolFlag{
Name: "ascending",
Usage: "sort in ascending order (default: descending)",
Destination: &conf.Ascending,
Aliases: []string{"a"},
},
&cli.BoolFlag{
Name: "help-jsonpath",
Usage: "show jsonPath help",