On Tue, May 20, 2014 at 6:01 PM, Achim Domma <do...@procoders.net> wrote: > - I found several times code snippets like " if (collector instanceof > DelegatingCollector) { ((DelegatingCollector)collector).finish() } ". Such > code is considered bad practice in every OO language I know. Do I miss > something here? Is there a reason why it's solved like this?
In a single code base you would be correct (we would just add a finish method to the base Collector class). When you are adding additional functionality to an existing API/code base however, this is often the only way to do it. What type of aggregation are you looking for? The Heliosearch project (a Solr fork), also has this: http://heliosearch.org/solr-facet-functions/ -Yonik http://heliosearch.org - facet functions, subfacets, off-heap filters&fieldcache