add max_size to bloom filter, defaults to 500m

This commit is contained in:
kimchy 2011-02-08 23:02:29 +02:00
parent 1db2d993cb
commit 7a8995e6a8
1 changed files with 1 additions and 1 deletions

View File

@ -132,10 +132,10 @@ public class SimpleBloomCache extends AbstractIndexComponent implements BloomCac
filter = fieldCache.get(fieldName);
if (filter == null) {
filter = new BloomFilterEntry(currentNumDocs, BloomFilter.NONE);
filter.loading.set(true);
fieldCache.put(fieldName, filter);
// now, do the async load of it...
if (currentNumDocs < maxSize) {
filter.loading.set(true);
BloomFilterLoader loader = new BloomFilterLoader(reader, fieldName);
if (asyncLoad) {
threadPool.cached().execute(loader);