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 11B3E7066 for ; Mon, 12 Sep 2011 04:02:45 +0000 (UTC) Received: (qmail 81731 invoked by uid 500); 12 Sep 2011 04:02:35 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 79152 invoked by uid 500); 12 Sep 2011 04:02:14 -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 77878 invoked by uid 99); 12 Sep 2011 04:02:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Sep 2011 04:02:01 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of jturnbul@uow.edu.au does not designate 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Sep 2011 04:01:55 +0000 Received: from ben.nabble.com ([192.168.236.152]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1R2xi9-0007Os-P6 for java-user@lucene.apache.org; Sun, 11 Sep 2011 21:01:33 -0700 Date: Sun, 11 Sep 2011 21:01:33 -0700 (PDT) From: SBS To: java-user@lucene.apache.org Message-ID: <1315800093770-3328637.post@n3.nabble.com> Subject: How to ignore apostrophes in indexes and queries? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit In out situation we need it so that searches containing apostrophes and those not containing apostrophes yield identical results for content that contains apostrophes. We also need it so that the content is still stored with the apostrophes present and so that the highlighter indicates that the word(s) that need to be highlighted in the displayed content do contain the apostrophes. So for example, if the content looked something like: /*onset of Alzheimer's disease*/ then identical results would be returned for a query of /*alzheimers*/ and for a query of /*alzheimer's*/ and in both cases the highlighter would indicate that the word /*Alzheimer's*/ needs to be highlighted in the displayed content. Is this possible? What's the best way to achieve this? I am using Lucene 3.2 with StandardAnalyzer and QueryParser at present. Thanks, -sbs -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-ignore-apostrophes-in-indexes-and-queries-tp3328637p3328637.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org