all repos — searchix @ 7c0e3729dd314a571fd635408fb89f24199e00b3

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: revert back to using index as storage

Alan Pearce
commit

7c0e3729dd314a571fd635408fb89f24199e00b3

parent

e0bbccf0b9c5e43bfa2ef02a5bb33c27b8bf5d00

1 file changed, 1 insertion(+), 2 deletions(-)

changed files
M internal/server/mux.gointernal/server/mux.go
@@ -71,7 +71,6 @@ if options.ReadIndex == nil {
return nil, fault.New("read index is nil") } index := options.ReadIndex - store := options.Store sortSources(cfg.Importer.Sources) assets, err := frontend.New() if err != nil {
@@ -233,7 +232,7 @@ return
} importerSingular := importerType.Singular() - doc, err := store.GetDocument(source, r.PathValue("id")) + doc, err := index.GetDocument(r.Context(), source, r.PathValue("id")) if err != nil { if ftag.Get(err) == ftag.NotFound { log.Warn("document not found", "source", source.Key, "id", r.PathValue("id"))