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

HTML line breaks (<br>) are removed during indexing; causes wrong search results

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.2
    • 4.5
    • None
    • Windows Server 2008 R2, Java 6, Tomcat 7

    Description

      HTML line breaks (<br>, <BR>, <br/>, ...) seem to be removed during extraction of content from HTML-Files. They need to be replaced with a empty space.

      Test-File:
      <html>
      <head>
      <title>Test mit HTML-Zeilenschaltungen</title>
      </head>
      <p>
      word1<br>word2<br/>
      Some other words, a special name like linz<br>and another special name - vienna
      </p>
      </html>

      The Solr-content-attribute contains the following text:
      Test mit HTML-Zeilenschaltungen
      word1word2
      Some other words, a special name like linzand another special name - vienna

      So we are not able to find the word "linz".

      We use the ExtractingRequestHandler to put content into Solr. (wiki.apache.org/solr/ExtractingRequestHandler)

      Attachments

        1. external.htm
          0.2 kB
          Christoph Straßer
        2. Solr_HtmlLineBreak_Linz_NotFound.png
          89 kB
          Christoph Straßer
        3. Solr_HtmlLineBreak_Vienna.png
          108 kB
          Christoph Straßer
        4. SOLR-4679__weird_TIKA-1134.patch
          2 kB
          Chris M. Hostetter

        Issue Links

          Activity

            People

              uschindler Uwe Schindler
              christophs78 Christoph Straßer
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: