Return-Path: Delivered-To: apmail-incubator-esme-dev-archive@minotaur.apache.org Received: (qmail 92717 invoked from network); 15 Nov 2009 15:46:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Nov 2009 15:46:41 -0000 Received: (qmail 23580 invoked by uid 500); 15 Nov 2009 15:46:41 -0000 Delivered-To: apmail-incubator-esme-dev-archive@incubator.apache.org Received: (qmail 23528 invoked by uid 500); 15 Nov 2009 15:46:41 -0000 Mailing-List: contact esme-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: esme-dev@incubator.apache.org Delivered-To: mailing list esme-dev@incubator.apache.org Received: (qmail 23518 invoked by uid 99); 15 Nov 2009 15:46:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Nov 2009 15:46:41 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hirsch.dick@gmail.com designates 72.14.220.153 as permitted sender) Received: from [72.14.220.153] (HELO fg-out-1718.google.com) (72.14.220.153) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Nov 2009 15:46:38 +0000 Received: by fg-out-1718.google.com with SMTP id e12so836971fga.0 for ; Sun, 15 Nov 2009 07:46:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=CNevES3ht78YzsqNZVHXcl6Abjzag63QzXD7VAIMSi8=; b=HQY9pqM4LTUvWYlJWoS6ox9E+gsCIrkFp3GxCdvnkxJrKw0HJ6f32XzCQzYSJBtmgy 10ATOZPNCH4ES+LRVicE7POHmQmf2u0On8nQ3x6kcZ7qiXOW2aa8gbkcp1XCCrefcOv/ WHcFu0LfxbgOuSeeYtsEY1OyrlaxLTRb0sLDA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=FmFL7rDBdyykvii7txQe/04MbdfZn9mSrWeYP2Ln58kcV0Pp8YPSEcRPmB1HHGbydo 5+EAZLJp024bHAFJETlwbwyy8l1G+9TkXwThsLLxHBOkkRcVqOzsbq8ckM9HCV1p6ds2 pQ9YFDAy5nF0Qm2qc+eCGgVzljA6Pp1zHwTKA= MIME-Version: 1.0 Received: by 10.103.67.25 with SMTP id u25mr3097524muk.45.1258299976216; Sun, 15 Nov 2009 07:46:16 -0800 (PST) In-Reply-To: <4db64d890911150710v76ae0fabrf66d47868f95ae78@mail.gmail.com> References: <4db64d890911150710v76ae0fabrf66d47868f95ae78@mail.gmail.com> Date: Sun, 15 Nov 2009 16:46:16 +0100 Message-ID: Subject: Re: lucene search(Compass) at ESME From: Richard Hirsch To: esme-dev@incubator.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable The Compass integration should work and I've tried to get it to work in the Stax environment. Everything should be configured correctly (for file-based storage). I've tried it in the stax environment and wasn't successful. I can see that compass searches correctly but never finds anything (:-<) It is definitely a tough jira item. If you want take a look at Jira again and pick another jira item, you could do this as well. There are a lot of smaller tasks that I recently created. Many of them are related to other work you have done (creating new attributes, etc.). If you could do finish a few of these items this would be a big help. By the way, I don't know whether you saw the blog that described our internationalization efforts ( http://blog.esme.us/internationalization-efforts-begin-esme-in-chinese/) - I mentioned you by name. D. On Sun, Nov 15, 2009 at 4:10 PM, Xuefeng Wu wrote: > Hi, > > I'm sorry I'm busy these days and didn't do anything about ESME except ke= ep > an eye on. > > Today I have free time and try to resolve > ESME-101. > > I learned compass some hours and try to find out why the Search is broken= . > But fail to resolve the defects. > > I have a question: > I think Compass should know how to access the data but I didn't find any > configure for this. > Compass provide solution that could integrate with hibernate,JPA,JDBC ect= . > Did we need CompassGps? > > > I'm not family with JPA with Lift, I use JDBC Gps, but failed too, I thin= k > maybe I miss something.... > > I added such as: > =C2=A0val conf =3D tryo(new CompassConfiguration() > =C2=A0 =C2=A0 =C2=A0.configure(Props.get("compass_config_file") openOr > "/props/compass.cfg.xml") > =C2=A0 =C2=A0 =C2=A0.addClass((new Message).clazz)) > > =C2=A0 =C2=A0 =C2=A0def dataSource(): DataSource=3D { > =C2=A0 =C2=A0 =C2=A0 =C2=A0println("Create datasrouce") > =C2=A0 =C2=A0 =C2=A0 =C2=A0val bds: BasicDataSource =3D new BasicDataSour= ce(); > =C2=A0 =C2=A0 =C2=A0 =C2=A0bds.setDriverClassName("com.mysql.jdbc.Driver"= ); > =C2=A0 =C2=A0 =C2=A0 =C2=A0bds.setUrl("jdbc:mysql://localhost/esme"); > =C2=A0 =C2=A0 =C2=A0 =C2=A0bds.setUsername("esme"); > =C2=A0 =C2=A0 =C2=A0 =C2=A0bds.setPassword("esme"); > =C2=A0 =C2=A0 =C2=A0 =C2=A0bds > =C2=A0 } > > =C2=A0val mapping =3D { > =C2=A0 =C2=A0 =C2=A0val _mapping: ResultSetToResourceMapping =3D new > ResultSetToResourceMapping(); > =C2=A0 =C2=A0_mapping.setAlias("message"); > =C2=A0 =C2=A0_mapping.setSelectQuery("select m.id as id, m.text as text, = m.source as > source from esme.message m"); > =C2=A0 =C2=A0// maps from a parent_id column to a resource property named= parent-id > =C2=A0 =C2=A0_mapping.addIdMapping(new IdColumnToPropertyMapping("id", "i= d")); > =C2=A0 =C2=A0_mapping.addDataMapping(new DataColumnToPropertyMapping("tex= t", > "text")); > =C2=A0 =C2=A0_mapping.addDataMapping(new DataColumnToPropertyMapping("sou= rce", > "source")); > =C2=A0 =C2=A0_mapping > =C2=A0 =C2=A0} > > =C2=A0private val ismr: InputStreamMappingResolver =3D { > > =C2=A0 =C2=A0val ri: ResultSetResourceMappingResolver =3D new > ResultSetResourceMappingResolver() > =C2=A0 =C2=A0ri.setDataSource(dataSource) > =C2=A0 =C2=A0ri.setMapping(mapping) > =C2=A0 =C2=A0println(ri) > =C2=A0 =C2=A0ri > =C2=A0} > > =C2=A0val compass =3D conf.map(cf =3D> { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0try{cf.addMappingResover(ismr)}catch{case _ =3D> > println} ...... > > -- > Scala=E4=B8=AD=E6=96=87=E7=A4=BE=E5=8C=BA: =C2=A0http://groups.google.com= /group/scalacn >