Return-Path: X-Original-To: apmail-lucy-user-archive@www.apache.org Delivered-To: apmail-lucy-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 AB738C1E6 for ; Sat, 1 Feb 2014 18:45:15 +0000 (UTC) Received: (qmail 56000 invoked by uid 500); 1 Feb 2014 18:45:14 -0000 Delivered-To: apmail-lucy-user-archive@lucy.apache.org Received: (qmail 55946 invoked by uid 500); 1 Feb 2014 18:45:13 -0000 Mailing-List: contact user-help@lucy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@lucy.apache.org Delivered-To: mailing list user@lucy.apache.org Received: (qmail 55938 invoked by uid 99); 1 Feb 2014 18:45:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Feb 2014 18:45:13 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of peknet@gmail.com designates 209.85.223.172 as permitted sender) Received: from [209.85.223.172] (HELO mail-ie0-f172.google.com) (209.85.223.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Feb 2014 18:45:07 +0000 Received: by mail-ie0-f172.google.com with SMTP id e14so5404114iej.31 for ; Sat, 01 Feb 2014 10:44:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=ZWkTmXKmHd0RfQhw5Z7iUxoBKt6pnCoLR/+I7Jf3XZ4=; b=1Ci5hsSiQcpIerOa1hcNfX1AI8reKuUQ0eIzIgm76wa9mF+gHSvcQgoL8I36G8F1HT dhCBYUGo5FTGTa/iJk6HBtxAntN34B4/Zwjydc+lEYZgPZnF8eNj3jEMvoRzNh7EpHW0 rIvRcrZS3+aaki0TfaT/ROgoQC2/BQpUJpz5VWvKWv+DcIzpeMCcYxkevQO+4E+RtBl4 pbPAYmG5TenulYJD0BlvLgKZRjxiyHUe6W87akWh1Id4RY0h/8ra7DpVlnDOCslV8QiJ QPaKGPGBs0nSeLDHCreT/NkLQB1QNsoGlzFmaLzR1J1J8bZHsvv6ZiidpZMMEwMKBU6W wfBw== X-Received: by 10.50.25.41 with SMTP id z9mr4624458igf.10.1391280286550; Sat, 01 Feb 2014 10:44:46 -0800 (PST) Received: from PKarmanOSX.mpr.org (227.119.124.24.cm.sunflower.com. [24.124.119.227]) by mx.google.com with ESMTPSA id da10sm10922684igc.1.2014.02.01.10.44.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 01 Feb 2014 10:44:45 -0800 (PST) Sender: Peter Karman Message-ID: <52ED409B.7070008@peknet.com> Date: Sat, 01 Feb 2014 12:44:43 -0600 From: Peter Karman Reply-To: peter@peknet.com User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: user@lucy.apache.org References: <1391205599224-4114761.post@n3.nabble.com> In-Reply-To: <1391205599224-4114761.post@n3.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [lucy-user] Case Sensitive Index with options to do Case In-Sensitive search On 1/31/14 3:59 PM, Nick D. wrote: > Store this: "This is an Example of what a case Sensitive line would be" > > Search for this: "Example" > Also search for this: "example" > > And return the line stored for both searches. > > I have a need to have the option to do case insensitive and case sensitive > searches at search time and having 2 indexes (1 for each case) is not really > an option due to the amount of live data (data constantly coming off the > wire) being indexed at once. Store the same text under two different fields in the same index, one with an Analyzer w/CaseFolder (foo_lc) and one w/o (foo_cs). Then your query parser can expand your query to an 'OR' search for both fields. The alias_for feature in Search::Query::Parser could help: my $parser = Search::Query::Parser->new( dialect => 'Lucy', fields => { foo => [qw( foo_lc foo_cs )], }, ); https://metacpan.org/pod/Search::Query::Field#alias_for -- Peter Karman . http://peknet.com/ . peter@peknet.com