diff --git a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java index 5fede2ff853..04ed9e7f8da 100644 --- a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java +++ b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java @@ -376,7 +376,7 @@ public SolrIndexSearcher( this.queryResultMaxDocsCached = solrConfig.queryResultMaxDocsCached; this.useFilterForSortedQuery = solrConfig.useFilterForSortedQuery; - ordMapCache = solrConfig.ordMapCacheConfig.newInstance(); + ordMapCache = solrConfig.ordMapCacheConfig.newInstance(core); assert ordMapCache != null; this.leafReader = SlowCompositeReaderWrapper.wrap(this.reader, ordMapCache); diff --git a/solr/core/src/test/org/apache/solr/index/TestSlowCompositeReaderWrapper.java b/solr/core/src/test/org/apache/solr/index/TestSlowCompositeReaderWrapper.java index c0961d691d4..96ece3823ab 100644 --- a/solr/core/src/test/org/apache/solr/index/TestSlowCompositeReaderWrapper.java +++ b/solr/core/src/test/org/apache/solr/index/TestSlowCompositeReaderWrapper.java @@ -120,7 +120,7 @@ public void testOrdMapsAreCached() throws Exception { assertTrue(reader.leaves().size() > 1); @SuppressWarnings("unchecked") SolrCache ordMapCache = - OrdMapRegenerator.getDefaultCacheConfig(null).newInstance(); + OrdMapRegenerator.getDefaultCacheConfig(null).newInstance(null); SlowCompositeReaderWrapper slowWrapper = (SlowCompositeReaderWrapper) SlowCompositeReaderWrapper.wrap(reader, ordMapCache); assertEquals(0, slowWrapper.cachedOrdMaps.size());