Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 50626 invoked from network); 14 Mar 2011 12:04:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Mar 2011 12:04:09 -0000 Received: (qmail 1888 invoked by uid 500); 14 Mar 2011 12:04:07 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 1847 invoked by uid 500); 14 Mar 2011 12:04:06 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 1839 invoked by uid 99); 14 Mar 2011 12:04:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Mar 2011 12:04:06 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ian.lea@gmail.com designates 209.85.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-iy0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Mar 2011 12:03:59 +0000 Received: by iyj12 with SMTP id 12so7528679iyj.35 for ; Mon, 14 Mar 2011 05:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=RrH/bltlaJ8D2B4WJjtITajMFmcLr7bgr36wtncnV7w=; b=X555Atkdn6gHE9cqlDN18Q7/oohAJRTkgZGNU07iz6r/bUGnOo2ThV+fg3+n0p4sjS Xf9rx5rFA0ySG20x/rcrnt/f0qsxpP0EJYZtwu3F8WAmN6ovRvk2Y9rM5i2Uf46BSGa6 mmPnJyaCRbcDKm9C4S8qeUi4LpYdorn4ftoCc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=f3LiDujYZWInPDk8OiDNymY4TQ0Xwd9QYSxRJ5W6CQpJpTGZbCHqV0kyde8765ZQjE iL0zm2BHTF5cChLXNTsixb1NKHk6AKmx89CrKJB4jay+c0TMdc8Tr0tUkLPKtZcVs/S9 zh9cmxQ4oYV6ERzpRIL4ZH1wjZJX4BBjM850s= Received: by 10.231.82.70 with SMTP id a6mr2252995ibl.165.1300104218185; Mon, 14 Mar 2011 05:03:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.36.198 with HTTP; Mon, 14 Mar 2011 05:03:18 -0700 (PDT) In-Reply-To: <1300080805277-2675402.post@n3.nabble.com> References: <1300080805277-2675402.post@n3.nabble.com> From: Ian Lea Date: Mon, 14 Mar 2011 12:03:18 +0000 Message-ID: Subject: Re: Boost a field in fuzzy query To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org You could build the query up in your program, or that part of it anyway. BooleanQuery bq = new BooleanQuery(); FuzzyQuery fq = new FuzzyQuery(...); fq.setBoost(123f); bq.add(fq); ... This might be a bug in MultiFieldQueryParser - you could provide a test case or, better, a patch. See https://issues.apache.org/jira/browse/LUCENENET-147. Lucene.Net, but the comment there says "would probably mean Lucene Java also suffers from the same bug". Presumably you've read the "not very scalable" warning in the javadocs for FuzzyQuery. And you don't say what version of lucene you are using. If not the latest, try that. -- Ian. On Mon, Mar 14, 2011 at 5:33 AM, chhava40 wrote: > Hi, > I am using MultiFieldQueryParser to parse query for multiple fields with > custom boosts for each field. > The issue is when one of the terms in the query is fuzzy e.g abc~. > For such a term, the field boost is not applied. If the query is "abc~ xyz" > and fields are f1 & f2 with boosts 10, 5, the parsed query output is: > (f1:abc~0.5 f2:abc~0.5) (f1:xyz^10 f2:xyz^5). > Is there any way to apply the field boost factor to fuzzy terms as well? > Thanks. > > -- --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org