You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jamie Johnson (JIRA)" <ji...@apache.org> on 2012/05/14 17:23:53 UTC

[jira] [Commented] (SOLR-1397) It should be possible to highlight external text

    [ https://issues.apache.org/jira/browse/SOLR-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13274673#comment-13274673 ] 

Jamie Johnson commented on SOLR-1397:
-------------------------------------

Attached is a first patch at adding the External Highlighter.  I have not had a chance to write tests for this as of yet, but it's just meant to be a starting point.  There were some changes to the DefaultHighlighter, so my changes didn't apply cleanly out of the box, but hopefully I've caught everything.

To add an external provider just add this to the highlighter.

{code:title=solrconfig.xml}

    <highlighting>
		<externalFieldProvider default="true" name="text" class="somecustomfieldprovider">
        	<str name="param1">value</str>
      </externalFieldProvider>
{code}
                
> It should be possible to highlight external text
> ------------------------------------------------
>
>                 Key: SOLR-1397
>                 URL: https://issues.apache.org/jira/browse/SOLR-1397
>             Project: Solr
>          Issue Type: New Feature
>          Components: highlighter
>            Reporter: Anders Melchiorsen
>         Attachments: DefaultSolrHighlighter.java, ExternalHighlighter.patch, SolrExternalFieldProvider.java, SolrHighlighter.java, TestExternalFieldProvider.java
>
>
> Many sites don't store text in Lucene/Solr and so need a way to highlight text stored in a database (or some equivalent).
> As a workaround, FieldAnalysisRequestHandler can provide offsets from external text, but it does not support wildcard queries.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org