Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 65433 invoked from network); 20 Aug 2006 23:42:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Aug 2006 23:42:18 -0000 Received: (qmail 58790 invoked by uid 500); 20 Aug 2006 23:42:13 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 58766 invoked by uid 500); 20 Aug 2006 23:42:13 -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 58755 invoked by uid 99); 20 Aug 2006 23:42:13 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Aug 2006 16:42:13 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [203.217.22.128] (HELO file1.syd.nuix.com.au) (203.217.22.128) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Aug 2006 16:42:12 -0700 Received: from [192.168.222.102] (demo1.syd.nuix.com.au [192.168.222.102]) by file1.syd.nuix.com.au (Postfix) with ESMTP id 75751B735C for ; Mon, 21 Aug 2006 09:41:09 +1000 (EST) Message-ID: <44E8F3DE.90304@nuix.com.au> Date: Mon, 21 Aug 2006 09:44:30 +1000 From: Daniel Noll Organization: NUIX Pty Limited User-Agent: Thunderbird 3.0a1 (Windows/20060817) MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: Apostrophe S ('s) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Sam Giffney wrote: > Using the Standard Analyzer the string > McDonald's > is indexed with the term > mcdonald > > so it will be found by a (QueryParser parsed) query for > McDonald > or > McDonald's > but not > McDonalds > > Wikipedia (who uses lucene) says on > http://en.wikipedia.org/wiki/Wikipedia:Searching > > An apostrophe is identical to a single quote, therefore Mu'ammar can > be found searching for exactly that (and not otherwise). A word with > apostrophe s is an exception in that it can be found also searching > for the word without the apostrophe and the s. > > Is this a custom parser? Following Wikipedia's explanation, McDonald's -> McDonald, by removing the apostrophe *AND* the s. That text you quoted doesn't say that you can omit the apostrophe while leaving in the s, so my guess is they're using the exact same analyser. In any case, have you tried using stemming? Stemming would convert "mcdonalds" -> "mcdonald" so that both work. Daniel --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org