fix search output order (last on bottom) and index ls output partials (#30)

This commit is contained in:
T. von Dein
2026-06-08 12:09:01 +02:00
parent c4143093fd
commit f30c837d53
7 changed files with 34 additions and 22 deletions

View File

@@ -99,9 +99,7 @@ func searchOnce(conf *cfg.Config, search *search.Search) error {
slog.Debug("ES result", "search", res)
for _, hit := range res.Hits.Hits {
printer.PrintDoc(conf, hit)
}
printer.PrintDocs(conf, res.Hits.Hits)
return nil
}
@@ -141,9 +139,7 @@ func searchPit(conf *cfg.Config, req *search.Request) error {
break
}
for _, hit := range res.Hits.Hits {
printer.PrintDoc(conf, hit)
}
printer.PrintDocs(conf, res.Hits.Hits)
last := res.Hits.Hits[len(res.Hits.Hits)-1]
search = search.SearchAfterValues(last.Sort)
@@ -178,6 +174,7 @@ func searchTail(conf *cfg.Config, search *search.Search) error {
}
printer.PrintDoc(conf, hit)
fmt.Println()
docs[*hit.Id_] = 1
}