feliperazeek / playframework-elasticsearch

Integrate Elastic Search in a Play! Framework Application. This module uses JPA events to notify Elastic Search of events of their own. It embeds a running Elastic Search instance for Rapid Development.
http://geeks.aretotally.in/play-framework-module-elastic-search-distributed-searching-with-json-http-rest-or-java
84 stars 43 forks source link

Allow custom type mappers #57

Open kretes opened 12 years ago

kretes commented 12 years ago

It would be nice to register custom mapper for a type of field.

My case is having a jodatime LocalDate class in an entity, which I would like to be treated as java.util.Data. From what i see I guess some strategy should be used in MappingUtil, so that I can do:

MappingUtil.registerMapper(LocalDate.class,new LocalDateMapper());

the interface for mapper should probably include a conversion between string value and object.