Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 6325 invoked from network); 8 Feb 2007 18:33:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Feb 2007 18:33:32 -0000 Received: (qmail 13731 invoked by uid 500); 8 Feb 2007 18:33:33 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 13692 invoked by uid 500); 8 Feb 2007 18:33:33 -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 13676 invoked by uid 99); 8 Feb 2007 18:33:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Feb 2007 10:33:33 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of chris.lu@gmail.com designates 66.249.92.168 as permitted sender) Received: from [66.249.92.168] (HELO ug-out-1314.google.com) (66.249.92.168) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Feb 2007 10:33:23 -0800 Received: by ug-out-1314.google.com with SMTP id k40so561358ugc for ; Thu, 08 Feb 2007 10:33:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Y/wVX4jcUx3cUYyZhc4QWeI0G1fyLwyHHPmVs7LwE9Xhr7p/WGRoqcDvtCX05OQvnneGFmyIxARHWVUMtu6hsMHInubj2bteNXNLOmXfpqaRixfYlkgRzyYPWcW+uU40M+UGta2b1qrOj+B07vceRMERnTKLIzPCPg8Jny1z86g= Received: by 10.82.155.10 with SMTP id c10mr1947792bue.1170959581444; Thu, 08 Feb 2007 10:33:01 -0800 (PST) Received: by 10.82.166.7 with HTTP; Thu, 8 Feb 2007 10:33:01 -0800 (PST) Message-ID: <6e3ae6310702081033l75afa34kf7f921ad09c91e84@mail.gmail.com> Date: Thu, 8 Feb 2007 10:33:01 -0800 From: "Chris Lu" To: java-user@lucene.apache.org Subject: Re: Analyzers In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <359a92830702080933l64860a92sc4bce1f3ec0f9ac7@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org This is an example for PerFieldAnalyzerWrapper, public Analyzer getAnalyzer() throws ClassNotFoundException, InstantiationException, IllegalAccessException{ _analyzer = new PerFieldAnalyzerWrapper((Analyzer) Class.forName(this.getAnalyzerName()).newInstance()); ArrayList columns = this.getColumns(); for(int i=0; i< columns.size(); i++) { Column c = (Column) columns.get(i); if(c.getAnalyzerName()!=null) { _analyzer.addAnalyzer(c.getColumnName(), (Analyzer) Class.forName(c.getAnalyzerName()).newInstance()); } } return (Analyzer) _analyzer; } -- Chris Lu ------------------------- Instant Full-Text Search On Any Database/Application site: http://www.dbsight.net demo: http://search.dbsight.com On 2/8/07, Kainth, Sachin wrote: > Can you give me an example of how this might be done? > > -----Original Message----- > From: Erick Erickson [mailto:erickerickson@gmail.com] > Sent: 08 February 2007 17:34 > To: java-user@lucene.apache.org > Subject: Re: Analyzers > > Use PerFieldAnalyzerWrapper. > > On 2/8/07, Kainth, Sachin wrote: > > > > Hi all, > > > > I wanted to know if it is possible to store some fields in an index > > with one analyzers and other fields with another analyzer? > > > > Cheers > > > > Sachin > > > > > > This email and any attached files are confidential and copyright > > protected. If you are not the addressee, any dissemination of this > > communication is strictly prohibited. Unless otherwise expressly > > agreed in writing, nothing stated in this communication shall be > legally binding. > > > > The ultimate parent company of the Atkins Group is WS Atkins plc. > > Registered in England No. 1885586. Registered Office Woodcote Grove, > > Ashley Road, Epsom, Surrey KT18 5BW. > > > > Consider the environment. Please don't print this e-mail unless you > > really need to. > > > > > This message has been scanned for viruses by MailControl - (see > http://bluepages.wsatkins.co.uk/?4318150) > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org