Lot 3 (1/4) : racine S3, backend du Store (catalogue + objets minio-go)
Arborescence dans s3_nodes, contenus sous des clés o/<id> figées au dépôt, corbeille dans s3_trash, configuration admin dans s3_config. Délégations S3 dans List/Stat/Open/Put/Mkdir/Move/Copy/Delete/Walk/corbeille, miniatures, partages, tags, recherche (noms et tags). Pas d'historique. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LNfwm4pfYR9C914C2EeiuB
This commit is contained in:
1 parent
235916157a
commit
7c1f49cb5c
13 files changed
+379
-29
No files matched your search
@@ -156,6 +156,32 @@ func (s *Store) Search(q string, f Filter, limit int) ([]Hit, error) {
|
||||
return []Hit{}, nil
|
||||
}
|
||||
meta := s.metaSnapshot()
|
||||
if s.s3 != nil { // S3 : noms et tags seulement, pas de plein texte
|
||||
out := []Hit{}
|
||||
err := s.s3Walk("", func(rel string, e Entry) error {
|
||||
if rel == "" || len(out) >= limit {
|
||||
return nil
|
||||
}
|
||||
hit := Hit{Entry: e}
|
||||
decorate(&hit.Entry, meta)
|
||||
if f.Favorite && !hit.Favorite {
|
||||
return nil
|
||||
}
|
||||
tags := fold(strings.Join(hit.Tags, "\n"))
|
||||
if tag != "" && !strings.Contains("\n"+tags+"\n", "\n"+tag+"\n") {
|
||||
return nil
|
||||
}
|
||||
name := fold(e.Name) + "\n" + tags
|
||||
for _, t := range terms {
|
||||
if !strings.Contains(name, t) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
out = append(out, hit)
|
||||
return nil
|
||||
})
|
||||
return out, err
|
||||
}
|
||||
s.index.mu.Lock()
|
||||
defer s.index.mu.Unlock()
|
||||
if s.index.docs == nil {
|
||||
|
||||
Reference in new issue
Block a user