Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@minotaur.apache.org Received: (qmail 76860 invoked from network); 2 Sep 2009 08:20:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Sep 2009 08:20:57 -0000 Received: (qmail 29737 invoked by uid 500); 2 Sep 2009 08:20:57 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 29649 invoked by uid 500); 2 Sep 2009 08:20:57 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 29631 invoked by uid 99); 2 Sep 2009 08:20:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2009 08:20:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2009 08:20:54 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B9547234C045 for ; Wed, 2 Sep 2009 01:20:32 -0700 (PDT) Message-ID: <778412146.1251879632758.JavaMail.jira@brutus> Date: Wed, 2 Sep 2009 01:20:32 -0700 (PDT) From: "Anders Melchiorsen (JIRA)" To: solr-dev@lucene.apache.org Subject: [jira] Commented: (SOLR-1398) PatternTokenizerFactory ignores offset corrections In-Reply-To: <91332641.1251711992907.JavaMail.jira@brutus> 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-1398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750325#action_12750325 ] Anders Melchiorsen commented on SOLR-1398: ------------------------------------------ Thanks. The patch appears to work, in that analysis.jsp now gives correct results. However, I am still not able to get highlights in my actual application, due to the below error. There is the same problem with the WhitespaceTokenizer. I guess that this is a separate issue, where the highlighter is also not using offset corrections. Would you mind opening a ticket for that issue, as I am not quite sure what to put into it, or where to put it. SEVERE: org.apache.solr.common.SolrException: org.apache.lucene.search.highlight.InvalidTokenOffsetsException: Token teknisk exceeds length of provided text sized 803 at org.apache.solr.highlight.DefaultSolrHighlighter.doHighlighting(DefaultSolrHighlighter.java:328) at org.apache.solr.handler.component.HighlightComponent.process(HighlightComponent.java:89) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:195) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1299) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:285) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) Caused by: org.apache.lucene.search.highlight.InvalidTokenOffsetsException: Token teknisk exceeds length of provided text sized 803 at org.apache.lucene.search.highlight.Highlighter.getBestTextFragments(Highlighter.java:254) at org.apache.solr.highlight.DefaultSolrHighlighter.doHighlighting(DefaultSolrHighlighter.java:321) ... 23 more > PatternTokenizerFactory ignores offset corrections > -------------------------------------------------- > > Key: SOLR-1398 > URL: https://issues.apache.org/jira/browse/SOLR-1398 > Project: Solr > Issue Type: Bug > Components: Analysis > Affects Versions: 1.4 > Reporter: Anders Melchiorsen > Assignee: Koji Sekiguchi > Priority: Minor > Fix For: 1.4 > > Attachments: SOLR-1398.patch > > > I have an analyzer with a MappingCharFilterFactory followed by a PatternTokenizerFactory. This causes wrong offsets, and thus wrong highlights. > Replacing the tokenizer with WhitespaceTokenizerFactory gives correct offsets, so I expect the problem to be with PatternTokenizerFactory. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.