Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 73968 invoked from network); 13 Nov 2009 22:45:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Nov 2009 22:45:04 -0000 Received: (qmail 77053 invoked by uid 500); 13 Nov 2009 22:45:03 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 76965 invoked by uid 500); 13 Nov 2009 22:45:03 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 76957 invoked by uid 99); 13 Nov 2009 22:45:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Nov 2009 22:45:03 +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; Fri, 13 Nov 2009 22:45:00 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9E336234C4D1 for ; Fri, 13 Nov 2009 14:44:39 -0800 (PST) Message-ID: <2046453413.1258152279646.JavaMail.jira@brutus> Date: Fri, 13 Nov 2009 22:44:39 +0000 (UTC) From: "Uwe Schindler (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Issue Comment Edited: (LUCENE-2064) Highlighter should support all MultiFieldQuery subclasses without casts In-Reply-To: <2095660307.1258145439756.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/LUCENE-2064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12777686#action_12777686 ] Uwe Schindler edited comment on LUCENE-2064 at 11/13/09 10:42 PM: ------------------------------------------------------------------ This is cool. Highlighter & MTQ is broken in 2.9.1. This patch looks completely broken, but it isn't - and my mind was also broken when I first saw the patch - because of that. This patch is cooler than all heavy commiting during ApacheCon. +1 for 3.0 with this patch.That was what I wanted to say with my complete nonsense comment. was (Author: thetaphi): This is cool. Highlighter & MTQ is broken in 2.9.1. This patch looks completely broken - and my mind was also broken when I first saw the patch - because of that. This patch is cooler than all heavy commiting during ApacheCon. +1 for 3.0 with this patch.That was what I wanted to say with my complete nonsense comment. > Highlighter should support all MultiFieldQuery subclasses without casts > ----------------------------------------------------------------------- > > Key: LUCENE-2064 > URL: https://issues.apache.org/jira/browse/LUCENE-2064 > Project: Lucene - Java > Issue Type: Improvement > Components: contrib/highlighter > Affects Versions: 2.9.1 > Reporter: Simon Willnauer > Assignee: Simon Willnauer > Fix For: 3.0 > > Attachments: LUCENE-2064.txt > > > In order to support MultiTermQuery subclasses the Highlighter component applies instanceof checks for concrete classes from the lucene core. This prevents classes like RegexQuery in contrib from being supported. Introducing dependencies on other contribs is not feasible just for being supported by the highlighter. > While the instanceof checks and subsequent casts might hopefully go somehow away in the future but for supporting more multterm queries I have a alternative approach using a fake IndexReader that uses a RewriteMethod to force the MTQ to pass the field name to the given reader without doing any real work. It is easier to explain once you see the patch - I will upload shortly. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org