That's how it has been done:
We don't do the superfluous instantiation anymore during the course of applying filters; we only instantiate the filter (factory) there if needed either for key determination - should be less common now with the automatic key determination - or for obtaining the actual Lucene filter if it is not yet cached.
There is still the additional instantiation during start-up for validation purposes. While we could keep the instances around and re-use it for the first actual application, that seems like a lot of work without big benefit. So we decided against it for the time being.
|