Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 62198 invoked from network); 2 Mar 2007 00:34:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Mar 2007 00:34:18 -0000 Received: (qmail 79563 invoked by uid 500); 2 Mar 2007 00:34:20 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 79515 invoked by uid 500); 2 Mar 2007 00:34:20 -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 79503 invoked by uid 99); 2 Mar 2007 00:34:20 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2007 16:34:20 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2007 16:34:11 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E94687142BE for ; Thu, 1 Mar 2007 16:33:50 -0800 (PST) Message-ID: <12437812.1172795630953.JavaMail.jira@brutus> Date: Thu, 1 Mar 2007 16:33:50 -0800 (PST) From: "Steven Parkes (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-796) Change Visibility of fields[] in MultiFieldQueryParser In-Reply-To: <11531223.1170759965935.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477147 ] Steven Parkes commented on LUCENE-796: -------------------------------------- This code is a little bit twisted; took me a while to figure out how it was working. I'm wondering what you want to do with the variables if they're available ... not that I'm terribly against making them protected (or adding gettter/setters), but I see another issue here. The code right now takes two paths: if you pass a field, it just calls QP via super. If you don't pass a field, it loops through each of the fields it has, which I suspect is usually what one wants. But in this loop, it also calls super, which means you don't get a chance in your derived class to override it again. I think it would make more sense to not call super in the loop case. So derived classes can get access to the call both when no field is passed and when each field is passed. Out of curiosity, would this do anything for you? If these were to be made protected, would you just be writing the loop yourself? > Change Visibility of fields[] in MultiFieldQueryParser > ------------------------------------------------------ > > Key: LUCENE-796 > URL: https://issues.apache.org/jira/browse/LUCENE-796 > Project: Lucene - Java > Issue Type: Improvement > Components: QueryParser > Affects Versions: 2.1 > Environment: not important > Reporter: Oliver Hummel > Fix For: 2.2 > > > In MultiFieldQueryParser the two methods > protected Query getFuzzyQuery(String field, String termStr, float minSimilarity) throws ParseException > protected Query getWildcardQuery(String field, String termStr) throws ParseException > are intended to be overwritten if one would like to avoid fuzzy and wildcard queries. However, the String[] fields attribute of this class is private and hence it is not accessible in subclasses of MFQParser. If you just change it to protected this issue should be solved. -- 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