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 18E0B9CCE for ; Tue, 8 Nov 2011 12:17:47 +0000 (UTC) Received: (qmail 6054 invoked by uid 500); 8 Nov 2011 12:17:44 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 6010 invoked by uid 500); 8 Nov 2011 12:17:44 -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 6002 invoked by uid 99); 8 Nov 2011 12:17:44 -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 12:17:44 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of felipe.carvalho@gmail.com designates 209.85.215.176 as permitted sender) Received: from [209.85.215.176] (HELO mail-ey0-f176.google.com) (209.85.215.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Nov 2011 12:17:38 +0000 Received: by eyh5 with SMTP id 5so309880eyh.35 for ; Tue, 08 Nov 2011 04:17:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=9HdYy0S9dtnDLwXEGFHDOnFGfFFcbwY/Co81zGjALkc=; b=xLjVTf9AmtXP9+E1Xlag7yU0NFpZBYZd0J2i9RH90HT/g7g/W28PVD+jmEb+UGr9I9 eFSINvAalwvUrgW9Q9N5cx7UrOqkFbgMwNk2ieI6p8uwEKyXwpW6OObFfxqIbplOIGd0 ShFmiIbfIziCmxjbIngcpL1ooFPHVmguQ+oIU= Received: by 10.182.172.100 with SMTP id bb4mr10041212obc.3.1320754638069; Tue, 08 Nov 2011 04:17:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.39.3 with HTTP; Tue, 8 Nov 2011 04:16:57 -0800 (PST) In-Reply-To: References: <4A5A76AB-AA58-4A5B-9DF3-4EB76C7232F0@hoplahup.net> From: Felipe Carvalho Date: Tue, 8 Nov 2011 10:16:57 -0200 Message-ID: Subject: Re: Phonetic search with Lucene 3.2 To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=e89a8f83a1dd099ff304b13827b7 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f83a1dd099ff304b13827b7 Content-Type: text/plain; charset=ISO-8859-1 Thanks, Erik! I'm looking at lucene-all javadocs, and there are some interesting classes (specifically I'd like to use org.apache.lucene.analysis.br.BrazilianAnalyzer). I'm able to find lucene-core on http://search.maven.org/, but is there a lucene-all published on some maven repo? or should I get those contrib classes out of some other dependency? Thanks! On Tue, Nov 8, 2011 at 10:06 AM, Erik Hatcher wrote: > > On Nov 8, 2011, at 03:58 , Felipe Carvalho wrote: > > > 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. > > That class is in Lucene in Action's companion code, not Lucene itself. > Download it from http://www.manning.com/lucene > > > My Lucene In Action edition is from 2004, so I'm guessing things kinda > > changed since then. > > 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!) > > >> 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". > >> > >> Is it possible to do this? If so, how would I do it? Can I use specific > >> analyzers for each field? > > 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. > > Erik > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --e89a8f83a1dd099ff304b13827b7--