add index fields filter flags (#27)

This commit is contained in:
T. von Dein
2026-06-03 10:14:41 +02:00
parent 18af1b6073
commit 5ecba5abe6
3 changed files with 37 additions and 4 deletions

View File

@@ -260,6 +260,27 @@ func IndexFields(conf *cfg.Config) *cli.Command {
Usage: "show info about field capabilities",
UsageText: "index fields <index>",
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "aggretable",
Usage: "include only aggretable fields",
Destination: &conf.Aggretable,
Aliases: []string{"a"},
},
&cli.BoolFlag{
Name: "searchable",
Usage: "include only searchable fields",
Destination: &conf.Searchable,
Aliases: []string{"s"},
},
&cli.StringSliceFlag{
Name: "type",
Usage: "show only fields of this type",
Destination: &conf.Filter,
Aliases: []string{"t"},
},
},
Action: func(ctx context.Context, cmd *cli.Command) error {
index := cmd.Args().Get(0)
if index == "" {