implement batched index retrieval in GetIndexes method

This commit is contained in:
ionutboangiu
2025-09-12 06:36:24 +03:00
committed by Dan Christian Bogos
parent 8d05c14aec
commit 8546c4c64e
16 changed files with 112 additions and 117 deletions

View File

@@ -131,7 +131,7 @@ func (apierSv1 *APIerSv1) GetFilterIndexes(ctx *context.Context, arg *AttrGetFil
tntCtx = utils.ConcatenatedKey(tnt, arg.Context)
}
if indexes, err = apierSv1.DataManager.GetIndexes(
arg.ItemType, tntCtx, utils.EmptyString, true, true); err != nil {
arg.ItemType, tntCtx, true, true); err != nil {
return
}
if arg.FilterType != utils.EmptyString {

View File

@@ -286,7 +286,7 @@ func composeCacheArgsForFilter(dm *engine.DataManager, fltr *engine.Filter, tnt,
var rcvIndx map[string]utils.StringSet
if rcvIndx, err = dm.GetIndexes(utils.CacheReverseFilterIndexes, tntID,
utils.EmptyString, true, true); err != nil && err != utils.ErrNotFound { // error when geting the revers
true, true); err != nil && err != utils.ErrNotFound { // error when geting the revers
return
}
if err == utils.ErrNotFound || len(rcvIndx) == 0 { // no reverse index for this filter