esme-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xuefeng Wu <ben...@gmail.com>
Subject Re: lucene search(Compass) at ESME
Date Mon, 16 Nov 2009 05:01:14 GMT
@D.

Maybe I will use compass in our company for next project. At that time I
will have much time to learn compass.

I would resolve some small defects before I'm family with compass.

And thank you for that mentioned me.


On Sun, Nov 15, 2009 at 11:46 PM, Richard Hirsch <hirsch.dick@gmail.com>wrote:

> 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 <benewu@gmail.com> wrote:
> > Hi,
> >
> > I'm sorry I'm busy these days and didn't do anything about ESME except
> keep
> > an eye on.
> >
> > Today I have free time and try to resolve
> > ESME-101<https://issues.apache.org/jira/browse/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
> think
> > maybe I miss something....
> >
> > I added such as:
> >  val conf = tryo(new CompassConfiguration()
> >      .configure(Props.get("compass_config_file") openOr
> > "/props/compass.cfg.xml")
> >      .addClass((new Message).clazz))
> >
> >      def dataSource(): DataSource= {
> >        println("Create datasrouce")
> >        val bds: BasicDataSource = new BasicDataSource();
> >        bds.setDriverClassName("com.mysql.jdbc.Driver");
> >        bds.setUrl("jdbc:mysql://localhost/esme");
> >        bds.setUsername("esme");
> >        bds.setPassword("esme");
> >        bds
> >   }
> >
> >  val mapping = {
> >      val _mapping: ResultSetToResourceMapping = new
> > ResultSetToResourceMapping();
> >    _mapping.setAlias("message");
> >    _mapping.setSelectQuery("select m.id as id, m.text as text, m.source
> as
> > source from esme.message m");
> >    // maps from a parent_id column to a resource property named parent-id
> >    _mapping.addIdMapping(new IdColumnToPropertyMapping("id", "id"));
> >    _mapping.addDataMapping(new DataColumnToPropertyMapping("text",
> > "text"));
> >    _mapping.addDataMapping(new DataColumnToPropertyMapping("source",
> > "source"));
> >    _mapping
> >    }
> >
> >  private val ismr: InputStreamMappingResolver = {
> >
> >    val ri: ResultSetResourceMappingResolver = new
> > ResultSetResourceMappingResolver()
> >    ri.setDataSource(dataSource)
> >    ri.setMapping(mapping)
> >    println(ri)
> >    ri
> >  }
> >
> >  val compass = conf.map(cf => {
> >                          try{cf.addMappingResover(ismr)}catch{case _ =>
> > println} ......
> >
> > --
> > Scala中文社区:  http://groups.google.com/group/scalacn
> >
>



-- 
Scala中文社区:  http://groups.google.com/group/scalacn

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message