add index ls command, add table and color support

This commit is contained in:
2026-04-21 15:05:15 +02:00
parent 2b21fa0e7e
commit a7d979ca38
12 changed files with 344 additions and 18 deletions

View File

@@ -19,6 +19,7 @@ package es
import (
"context"
"fmt"
"log/slog"
"strings"
"codeberg.org/scip/esctl/pkg/cfg"
@@ -64,6 +65,8 @@ func Search(conf *cfg.Config, q string) error {
return fmt.Errorf("Error running search (esdsl): %s", err)
}
slog.Debug("ES result", "search", res)
for _, hit := range res.Hits.Hits {
fmt.Printf("%s\n", hit.Source_)
}