fix(search): skip deletion of missing temporary indexes
ci / db / db (push) Successful in 52s
ci / api / api (push) Successful in 42s

This commit is contained in:
mrleo1nid committed 2026-10-28 23:56:46 +03:00
1 parent 66d3897f66
commit f59d1e8d03
3 files changed
+67 -1

No files matched your search

+1 -1
View File
@@ -175,7 +175,7 @@ func (ix *Indexer) Reindex(ctx context.Context) error {
func (ix *Indexer) rebuild(ctx context.Context, s indexSpec) error {
next := s.uid + "_next"
if err := ix.meili.call(ctx, http.MethodDelete, "/indexes/"+next, nil); err != nil && !errors.Is(err, ErrMeiliNotFound) {
if err := ix.meili.deleteIndexIfExists(ctx, next); err != nil {
return err
}
if err := ix.meili.call(ctx, http.MethodPost, "/indexes", map[string]any{"uid": next, "primaryKey": "id"}); err != nil {