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 82FD199B9 for ; Tue, 8 Nov 2011 14:12:19 +0000 (UTC) Received: (qmail 85072 invoked by uid 500); 8 Nov 2011 14:12:17 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 85019 invoked by uid 500); 8 Nov 2011 14:12:17 -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 85011 invoked by uid 99); 8 Nov 2011 14:12:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Nov 2011 14:12:16 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.227.17.10] (HELO moutng.kundenserver.de) (212.227.17.10) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Nov 2011 14:12:12 +0000 Received: from [10.8.0.14] (cermat.PH-Karlsruhe.DE [193.197.80.3]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MJ0Dl-1RLIUu3hIP-002Iaq; Tue, 08 Nov 2011 15:11:50 +0100 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: Phonetic search with Lucene 3.2 From: Paul Libbrecht In-Reply-To: Date: Tue, 8 Nov 2011 15:11:49 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <188CE386-B48E-45D9-92A1-357345BA5029@hoplahup.net> References: <4A5A76AB-AA58-4A5B-9DF3-4EB76C7232F0@hoplahup.net> To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.1084) X-Provags-ID: V02:K0:ZxsSB5nl8IKjAIN6VyUXUWgMtSPZicsTS/A4DvOwkpb 2BwvQLzIDnC0yX0dH6mH3Ul5v1MGMN1SPPicEH2BoymU7zDIqI EB+e7vRAAgd52ceG3vmZdcXqqzwHvam1S54QP0FUE3XWxoXA4O x1D63PHefbQeyyaU/AFCrlR5oBt5P9ave0meHvh+nlVOS3pwan oUHyzx8yOmYO/f/CWv8e5malT2aFdKjwFRkVigmMaLFWMwksC+ dd0TvXBjpmXOV4V5ptikUCqVmJyfG7NosTSTVhrj3kn+28I6RG tZXu74ZG1e7uTOaXnW3btNkMp9ErwEGRkCFuLw4EF2vdr9Q1ZA +LBqrGvqnxYjPJFmiAClTURnsBj7BBWSxCGmdtZDs Felipe, I do not have a tutorial but what you are describing is what I have been = doing in ActiveMath. I have a little paper for you if you want that explains how it goes = there (http://www.hoplahup.net/paul_pubs/AccessRetrievalAM.html) and = the software is open-source (http://www.activemath.org/Software/) No tutorials however. I would believe Solr with dismax would be the easiest way to start. paul Le 8 nov. 2011 =E0 14:42, Felipe Carvalho a =E9crit : > On Tue, Nov 8, 2011 at 10:06 AM, Erik Hatcher = wrote: >=20 >>=20 >> On Nov 8, 2011, at 03:58 , Felipe Carvalho wrote: >>=20 >>> One other question: I'm looking at Lucene 3.4 javadocs ( >>> http://lucene.apache.org/java/3_4_0/api/core/index.html) but I can't >> find >>> MetaphoneReplacementAnalyzer anywhere. Does any one know if this = class >> has >>> been removed from lucene-core. >>=20 >> That class is in Lucene in Action's companion code, not Lucene = itself. >> Download it from http://www.manning.com/lucene >>=20 >>> My Lucene In Action edition is from 2004, so I'm guessing things = kinda >>> changed since then. >>=20 >> There's a second edition out now, well worth getting if I do say so = myself >> :) (I've learned a lot from reading and re-reading it myself, to be = honest >> - thanks MikeM!) >>=20 >>>> Now suppose my document had a particular field I don't want to be >>>> metaphones one the search, for instance, "exactName". For example, >> suppose >>>> I want to look for all documents which contents phonetically match = "kool >>>> kat" and exactName match "kat" but not "cat", generating an = expression >> like >>>> this: "exactName:kat AND contents:kool kat". >>>>=20 >>>> Is it possible to do this? If so, how would I do it? Can I use = specific >>>> analyzers for each field? >>=20 >> 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. >=20 > Thanks a lot! >=20 >=20 >>=20 >> Erik >>=20 >>=20 >>=20 >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-user-help@lucene.apache.org >>=20 >>=20 --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org