Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 123829C6E for ; Tue, 8 Nov 2011 14:20:32 +0000 (UTC) Received: (qmail 94395 invoked by uid 500); 8 Nov 2011 14:20:30 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 94351 invoked by uid 500); 8 Nov 2011 14:20:30 -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 94343 invoked by uid 99); 8 Nov 2011 14:20:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Nov 2011 14:20:30 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of erik.hatcher@gmail.com designates 209.85.212.48 as permitted sender) Received: from [209.85.212.48] (HELO mail-vw0-f48.google.com) (209.85.212.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Nov 2011 14:20:22 +0000 Received: by vws7 with SMTP id 7so482844vws.35 for ; Tue, 08 Nov 2011 06:20:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=Pe1+XSMu1ElRUlrx3y1jelY62sb62yT8bSQYRmk3uS4=; b=u43H0rHG2cDrZ1GtypcgniTptIBXpdAMrNF6N8HL3kHK6q7rkdbTky/QldUryLu6Yk YIbiEvYdBU4OJnNpEFpa4O6EMX3/u6MWwEmOQ2XSuSxkipq5kfOkez/b/SYkKVjaRd7Z OmjgDxMBNdIbiJnXrMb7NtNgfm50MaPdMOXdY= Received: by 10.68.0.42 with SMTP id 10mr1220429pbb.29.1320762000593; Tue, 08 Nov 2011 06:20:00 -0800 (PST) Received: from [192.168.100.240] ([207.34.158.233]) by mx.google.com with ESMTPS id b8sm4592827pba.16.2011.11.08.06.19.59 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Nov 2011 06:19:59 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: Phonetic search with Lucene 3.2 From: Erik Hatcher In-Reply-To: Date: Tue, 8 Nov 2011 06:19:58 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <20F12225-21C9-479D-839B-A8D5D0F4BD9F@gmail.com> References: <4A5A76AB-AA58-4A5B-9DF3-4EB76C7232F0@hoplahup.net> To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.1084) X-Virus-Checked: Checked by ClamAV on apache.org On Nov 8, 2011, at 05:42 , Felipe Carvalho wrote: >> Yes, quite possible, including boosting on exact matches if you want. = Use >> a BooleanQuery to wrap clauses parsed once with phonetic analysis, = and once >> without, including fields at indexing time for both too of course. >>=20 >=20 > Would it be possible to point to an example where this is done. The = best > example of a BooleanQuery I've found so far is this one: > = http://www.avajava.com/tutorials/lessons/how-do-i-combine-queries-with-a-b= oolean-query.html >=20 > But I couldn't find a boolean query using different analyzers for = different > fields of the attribute. You could use two different QueryParser instances with different = analyzers. Or use the PerFieldAnalyzerWrapper, though you'll still need = to instances in order to have a different default field for each = expression. But then use the techniques you saw in that article (or in = Lucene in Action, since you mentioned having that) to combine Query = objects into a BooleanQuery. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org