[
https://issues.apache.org/jira/browse/SOLR-1105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15938457#comment-15938457
]
David Smiley commented on SOLR-1105:
------------------------------------
Thanks for contributing a patch Julien! I didn't thoroughly review it but one
thing caught my attention -- you added new parameters to the existing highlight
methods on UnifiedHighlighter. I think this atypical use-case doesn't warrant
that. Instead, notice much of the UH's configurability is from override-able
methods on the UH.
As an aside, I'm starting to wonder if there should be a "HighlightCommand" (or
HighlightOptions) class that holds all the options (via subclassing) so that
the UH needn't be subclassed to do 99% of use-cases.... I dunno. That's out of
scope here of course. Assuming it's a separate source file, it would also help
keep the sprawling UH source file in check. CC [~Timothy055]
Another issue I see is that (a) with this feature we want the ability highlight
multiple fields yet potentially use the same stored field, and (b) in that
case, we only want to load it once. It's not clear this patch takes that into
consideration? Again; I didn't thoroughly look over the patch yet.
> Use a different stored field for highlighting
> ---------------------------------------------
>
> Key: SOLR-1105
> URL: https://issues.apache.org/jira/browse/SOLR-1105
> Project: Solr
> Issue Type: Improvement
> Components: highlighter
> Reporter: Dmitry Lihachev
> Attachments: SOLR-1105-1_4_1.patch, SOLR-1105.patch,
> SOLR-1105_shared_content_field_1.3.0.patch
>
>
> DefaultSolrHighlighter uses stored field content to highlight. It has some
> disadvantages, because index grows up fast when using multilingual indexing
> due to several fields has to be stored with same content. This patch allows
> DefaultSolrHighlighter to use "contentField" attribute to loockup content in
> external field.
> Excerpt from old schema:
> {code:xml}
> <field name="title" type="text" stored="true" indexed="true" />
> <field name="title_ru" type="text_ru" stored="true" indexed="true" />
> <field name="title_en" type="text_en" stored="true" indexed="true" />
> <field name="title_de" type="text_de" stored="true" indexed="true" />
> {code}
> The same after patching, highlighter will now get content stored in "title"
> field
> {code:xml}
> <field name="title" type="text" stored="true" indexed="true" />
> <field name="title_ru" type="text_ru" stored="false" indexed="true"
> contentField="title"/>
> <field name="title_en" type="text_en" stored="false" indexed="true"
> contentField="title"/>
> <field name="title_de" type="text_de" stored="false" indexed="true"
> contentField="title"/>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]