[ https://issues.apache.org/jira/browse/SOLR-1105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15957712#comment-15957712 ]
David Smiley commented on SOLR-1105: ------------------------------------ bq. Why did you add a boolean flag for this to FieldProperties with the related modification to SchemaField accordingly? Answering my own question... I could imagine that it's useful metadata for a non-stored field to declare that some other field is the source of it's indexed/analyzed text. But the schema already internally tracks copyField source/destination data. Maybe what we could do is have highlighting automatically work on a non-stored field when we see that the field to be highlighted is a copyField target? Then, in practice, most users wouldn't even need to specify hl.contentField (though as an explicit option, it's still nice). > 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 > Assignee: David Smiley > 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org