BlurIndex index;
if (_clusterStatus.isReadOnly(true, _cluster, table)) {
BlurIndexReader reader = new BlurIndexReader(shardContext, dir, _refresher, _indexCloser);
index = reader;
} else {
BlurNRTIndex writer = new BlurNRTIndex(shardContext, _mergeScheduler, _closer, dir, _gc, _searchExecutor);
index = writer;
}
_filterCache.opening(table, shard, index);
TableDescriptor tableDescriptor = _clusterStatus.getTableDescriptor(true, _cluster, table);
warmUp(index, tableDescriptor, shard);