Thanks to Grant and Mike for the feedback! It is much appreciated. Is there a quick and easy way to check for unnecessary whitespace changes? It isn't that hard for me to go through the patch by hand to find and remove them, but if there is an easier way I'm happy to hear it.

I had taken the suggestion that Eli gave somewhat literally and made SolrHighlighter an interface like RequestHandler. In the SolrCore there are three existing objects that are configured: SolrEventListener, SolrRequestHandler, and UpdateHandler. The first two are interfaces and the third is an abstract class. While I'm sure the maintenance concern is legitimate, I'm not sure what the maintenance concern is - could someone elaborate?

I'll take your advice and make an AbstractSolrHighlighter that SolrHighlighter (and my custom highlighter) extends. I noticed that some of the other configurable objects implement SolrInfoMBean. Is this something that the SolrHighlighter/AbstractSolrHighlighter should also do?

Thanks,
Tricia

Mike Klaas (JIRA) wrote:
[ https://issues.apache.org/jira/browse/SOLR-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574337#action_12574337 ]
Mike Klaas commented on SOLR-386:
---------------------------------

Hi Tricia,

I'm not sure that I would ever use SolrHighlighter overriding (if I had the 
need, I probably would just make a separate search component).  However, 
several people want this functionality and it has relatively low 
implementation/maintenance cost.

There are a few things that need to be done to get the patch committed.  First, 
the unnecessary whitespace changes in SolrCore shouldn't be in the diff (it 
makes it really hard to see the changes, and might make it hard to 
apply/revert).  Also, I'm skeptical of using interfaces for this type of thing, 
for maintenance reasons.  Perhaps we could move to one of the approaches that 
Grant suggested?

Thanks again for the contribution, and sorry it took so long



Add confuguration to specify SolrHighlighter implementation
-----------------------------------------------------------

                Key: SOLR-386
                URL: https://issues.apache.org/jira/browse/SOLR-386
            Project: Solr
         Issue Type: Improvement
         Components: highlighter
   Affects Versions: 1.3
           Reporter: Eli Levine
           Assignee: Mike Klaas
        Attachments: SOLR-386-SolrHighlighter.patch, 
SOLR-386-SolrHighlighter.patch, SOLR-386-SolrHighlighter.patch, 
SOLR-386-SolrHighlighter.patch


It would be great if SolrCore allowed the highlighter class to be configurable.  A 
good way would be to add a +class+ attribute to the <highlighting> element in 
solrconfig.xml, similar to how the RequestHandler instance is initialized in SorCore.


Reply via email to