mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-29 19:07:33 +00:00
fix(search) Add facets list to our cache key to avoid cache collisions (#8327)
This commit is contained in:
parent
2d6c235d1e
commit
96dd91e994
@ -9,7 +9,7 @@ import java.util.List;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.javatuples.Quintet;
|
||||
import org.javatuples.Sextet;
|
||||
import org.springframework.cache.CacheManager;
|
||||
|
||||
import static com.datahub.util.RecordUtils.*;
|
||||
@ -29,8 +29,8 @@ public class CachingAllEntitiesSearchAggregator {
|
||||
return new CacheableSearcher<>(cacheManager.getCache(ALL_ENTITIES_SEARCH_AGGREGATOR_CACHE_NAME), batchSize,
|
||||
querySize -> aggregator.search(entities, input, postFilters, sortCriterion, querySize.getFrom(),
|
||||
querySize.getSize(), searchFlags, facets),
|
||||
querySize -> Quintet.with(entities, input, postFilters != null ? toJsonString(postFilters) : null,
|
||||
sortCriterion != null ? toJsonString(sortCriterion) : null, querySize), searchFlags, enableCache)
|
||||
querySize -> Sextet.with(entities, input, postFilters != null ? toJsonString(postFilters) : null,
|
||||
sortCriterion != null ? toJsonString(sortCriterion) : null, facets, querySize), searchFlags, enableCache)
|
||||
.getSearchResults(from, size);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user