diff --git a/pkg/services/object/search/exec.go b/pkg/services/object/search/exec.go index 1526b201..3469c1f0 100644 --- a/pkg/services/object/search/exec.go +++ b/pkg/services/object/search/exec.go @@ -39,10 +39,6 @@ func (exec *execCtx) prepare() { if _, ok := exec.prm.writer.(*uniqueIDWriter); !ok { exec.prm.writer = newUniqueAddressWriter(exec.prm.writer) } - - fs := exec.prm.SearchFilters() - fs.AddObjectContainerIDFilter(objectSDK.MatchStringEqual, exec.containerID()) - exec.prm.WithSearchFilters(fs) } func (exec *execCtx) setLogger(l *logger.Logger) { diff --git a/pkg/services/object/search/util.go b/pkg/services/object/search/util.go index 737f1940..36c8e8fa 100644 --- a/pkg/services/object/search/util.go +++ b/pkg/services/object/search/util.go @@ -82,7 +82,8 @@ func (c *clientWrapper) searchObjects(exec *execCtx) ([]*objectSDK.ID, error) { func (e *storageEngineWrapper) search(exec *execCtx) ([]*objectSDK.ID, error) { r, err := (*engine.StorageEngine)(e).Select(new(engine.SelectPrm). - WithFilters(exec.searchFilters()), + WithFilters(exec.searchFilters()). + WithContainerID(exec.containerID()), ) if err != nil { return nil, err