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

Use a different stored field for highlighting

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: highlighter
    • Labels:
      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-1_4_1.patch
          4 kB
          Evgeniy Serykh
        3. SOLR-1105.patch
          29 kB
          Julien Martin

          Issue Links

            Activity

              People

              • Assignee:
                dsmiley David Smiley
                Reporter:
                dmitry.lihachev Dmitry Lihachev
              • Votes:
                12 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated: