Hi,

I have a project, where we need to do aggregations over facetted values. The 
stats component is not powerful enough anymore and the new statistic component 
seems not to be ready yet. I understand that it's not easy to create a general 
purpose component for this task. I decided to check whether I can solve my use 
case by myself, but I'm struggling. Any clarification regarding the following 
points would be very appreciated:

- I assume that some of my use cases could be solved by using a custom 
collector. Lucene seems to be build to be extensible by deriving classes and 
overriding methods. That's how I would expect SOLID code to be. But looking at 
the SOLR code, I see a lot of hard coded types and no way to just exchange the 
collector. This is the case for most of the code parts I have read, so I 
wonder: Is there another way to customize / extend SOLR? How is the SOLR code 
supposed to be reused?

- 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?

cheers,
Achim

Reply via email to