Mittwoch, 29. April 2015

This is me / Project introduction

Hi,

my name is Martin Braun. I am currently in the last semester of my Bachelors Degree in Computer Science at the University of Bayreuth.

I've been around the Hibernate Search project for a while now. Mainly asking questions on how to solve my problems (I had several :D) and now I want to give something back during this year's Google Summer of Code.



The Project

Hibernate Search is an awesome library when you have a JPA based application and you want to add fully fletched fulltext search capabilities to your domain model. You simply add annotations to the fields you want to index and then you can generate a working Index from the JPA objects. When the database changes, the index is updated accordingly. This works just fine (TM).


Here is an example from the Hibernate Search getting started page
@Entity
@Indexed
public class Book {

  @Id
  @GeneratedValue
  private Integer id;

  @Field(index=Index.YES, analyze=Analyze.YES, store=Store.NO)
  private String title;

  @Field(index=Index.YES, analyze=Analyze.YES, store=Store.NO)
  private String subtitle;

  @Field(index=Index.YES, analyze=Analyze.NO, store=Store.YES)
  @DateBridge(resolution=Resolution.DAY)
  private Date publicationDate;

  @IndexedEmbedded
  @ManyToMany
  private Set<Author> authors = new HashSet<Author>();
  public Book() {
  }

  // standard getters/setters follow here
  ...
}

One of the few problems it has, is that once you decide to use Hibernate Search you have to use/stick with Hibernate ORM and lose the possibility to swap the JPA provider for something along the lines of EclipseLink (switching the JPA provider - in my eyes - is one of the big benefits of using JPA), i.e. because your (new) Jave EE Container ships with it and you don't want to change it. This is due to Hibernate Search relying on Hibernate ORM specific events to update its index. These are by far more sophisticated than the ones plain JPA provides and while other JPA providers might have similar features, there is no clear specification for these.

The current problem
The goal of my Google Summer of Code project is to fix this and provide an integration of Hibernate Search's Engine that works with (most) JPA providers (and for now only SQL databases). It can definitely be done (I already have proven that in some Unit tests in my project repository) and I hope that after this years Google Summer of Code is finished my integration is mostly complete for people to use.
What I aim for


This is it for now, I will be following up this blog post with more details on this integration is going to work in the near future.

Happy Coding!

Martin

Dienstag, 28. April 2015

Welcome to my Development Blog...

...about making Hibernate Search work with any JPA implementor. This will be the space where I write about new developments and my participation in the Google Summer of Code program.