Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1105

Use a different stored field for highlighting

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • highlighter
    • None

    Description

      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:

      <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" />
      

      The same after patching, highlighter will now get content stored in "title" field

      <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"/>
      

      Attachments

        1. SOLR-1105_shared_content_field_1.3.0.patch
          4 kB
          Dmitry Lihachev
        2. SOLR-1105.patch
          29 kB
          Julien Martin
        3. SOLR-1105-1_4_1.patch
          4 kB
          Evgeniy Serykh

        Issue Links

          Activity

            People

              dsmiley David Smiley
              dmitry.lihachev Dmitry Lihachev
              Votes:
              12 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated: