Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B3A013C43 for ; Mon, 2 May 2011 12:01:47 +0000 (UTC) Received: (qmail 70156 invoked by uid 500); 2 May 2011 12:01:45 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 70114 invoked by uid 500); 2 May 2011 12:01:45 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 70107 invoked by uid 99); 2 May 2011 12:01:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 May 2011 12:01:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 May 2011 12:01:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 120ECBD6C3 for ; Mon, 2 May 2011 12:01:04 +0000 (UTC) Date: Mon, 2 May 2011 12:01:04 +0000 (UTC) From: "Matthias Pigulla (JIRA)" To: dev@lucene.apache.org Message-ID: <943808258.15016.1304337664070.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (SOLR-42) Highlighting problems with HTMLStripWhitespaceTokenizerFactory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SOLR-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027629#comment-13027629 ] Matthias Pigulla commented on SOLR-42: -------------------------------------- I don't think it's a duplicate and the issue is still unresolved at least in regard to [#comment-12625835] and the 1.4.1 release. The input string "xx yy xx" will have the start offsets for xx, yy and xx at 3, 6 and 9 respectively and is off by one. "xx yy xx" will even have 6, 9 and 12, that is, every "" (as a special "degenerated" kind of XML PI) will shift the offset by one. > Highlighting problems with HTMLStripWhitespaceTokenizerFactory > -------------------------------------------------------------- > > Key: SOLR-42 > URL: https://issues.apache.org/jira/browse/SOLR-42 > Project: Solr > Issue Type: Bug > Components: highlighter > Reporter: Andrew May > Assignee: Grant Ingersoll > Priority: Minor > Attachments: HTMLStripReaderTest.java, HtmlStripReaderTestXmlProcessing.patch, HtmlStripReaderTestXmlProcessing.patch, SOLR-42.patch, SOLR-42.patch, SOLR-42.patch, SOLR-42.patch, TokenPrinter.java, htmlStripReaderTest.html > > > Indexing content that contains HTML markup, causes problems with highlighting if the HTMLStripWhitespaceTokenizerFactory is used (to prevent the tag names from being searchable). > Example title field: > 40Ar/39Ar laserprobe dating of mylonitic fabrics in a polyorogenic terrane of NW Iberia > Searching for title:fabrics with highlighting on, the highlighted version has the tags in the wrong place - 22 characters to the left of where they should be (i.e. the sum of the lengths of the tags). > Response from Yonik on the solr-user mailing-list: > HTMLStripWhitespaceTokenizerFactory works in two phases... > HTMLStripReader removes the HTML and passes the result to > WhitespaceTokenizer... at that point, Tokens are generated, but the > offsets will correspond to the text after HTML removal, not before. > I did it this way so that HTMLStripReader could go before any > tokenizer (like StandardTokenizer). > Can you open a JIRA bug for this? The fix would be a special version > of HTMLStripReader integrated with a WhitespaceTokenizer to keep > offsets correct. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org