fix(search): skip deletion of missing temporary indexes
This commit is contained in:
1 parent
66d3897f66
commit
f59d1e8d03
3 files changed
+67
-1
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user