Matt RaibleMatt Raible is a Java Champion and Developer Advocate at Okta.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

Integrating Lucene with Hibernate

The code_poet has an interesting post on using a Hibernate interceptor to index objects for Lucene searching. I've been thinking about integrating Lucene into AppFuse (or at least providing a tutorial) for quite some time. Hopefully this post will serve as a starting point when I do. I wonder how much the Lucene code can be simplified by the Spring support in the Spring Modules project?

Posted in Java at Aug 17 2005, 10:19:09 PM MDT 17 Comments

Perhaps can help you in doing this.

Posted by on August 18, 2005 at 12:48 AM MDT #

Matt, Great Idea. Having some sort of "Search" would open up a whole lot of new market for Appfuse. I'm currently working on search technologies and would love to use Appfuse as the base.

Posted by Muthu Ramadoss on August 18, 2005 at 12:49 AM MDT #

I've been experimenting with this lately, and I'm taking the approach here: The nice thing is that this integrates well with Acegi. The DomainInstance can be reused for Metadata, folksonomy style tagging, etc. Thoughts?

Posted by Mark Dillon on August 18, 2005 at 01:38 AM MDT #


The AtLeap project (if you remember - a CMS based on AppFuse) is integrating Lucene as well as Quartz(both on the wishlist of appfuse users), so I think that project would be also a good place to start.

just my 2 cents...,


Posted by Ahmed Mohombe on August 18, 2005 at 01:49 AM MDT #

Hello Matt, The aim of the support of Lucene in Spring Modules is to abstract the technical plumbing of Lucene behind template for indexing. The developer can focus on how to create a document from one or several objects and doesn't mind if he must use an IndexReader or an IndexWriter to add documents or delete documents. Moreover you can hide the concurrency mechanism behind template for example and the configuration of the index management is done in the configuration of Spring. For the search, it's the same thing, the developer can focus on the way to extract search results from Hits within template or queries, and the configuration of the Searcher is done too in the configuration of Spring. Any thoughts on that? Thierry

Posted by Thierry Templier on August 18, 2005 at 02:40 AM MDT #

Hi Matt, Have a look at Compass Framework. It does exactly what you need. It also has the petclinic sample so you can see how easy it is to integrate Compass (and Lucene underneath) with Spring based application. Shay

Posted by Shay Banon on August 18, 2005 at 04:00 AM MDT #

Thanks for the intrest Matt. I've used a similar approach to my current non-opensource projects and it has worked very well for us. I hope the code posted will be useful to others, and I'm interested if people have ideas for improvement!

I took a brief look at compass, but it appears to be much more heavyweight than necessary. I don't see the need for such an elaborate "framework" when a two class example covers 90% of user needs.

Posted by Ryan Sonnek on August 18, 2005 at 08:32 AM MDT #

Ryan, what about transaction support, integration with the transaction mechanism, no search specific properties in the domain model, better performance, to name a few. Personally, I believe that they do not qualify as a 10% of the cases (thats why I developed Compass). And about the Framework part, I agree that it does not qualify 100% to a framework, but was taken :-) . And if Spring are doing it, why not others?

Posted by Shay Banon on August 18, 2005 at 11:14 AM MDT #

Hello Matt,
Pardon me for my impateint approach, but when are you likely to come up with your new tutorial on Appfuse about integrating Lucene with Spring/Hibernate?

This is not to mention that I (and my colleagues) was greatly benefited from your book 'Spring Live' and also from your appfuse project. Therefore, it is naturally an expectation from us to get more from your tutorials. Will it take too long? Could you provide an approximation date?

Posted by M M Islam Chisty on October 20, 2005 at 10:31 PM MDT #

Hi Matt,
Can you give us an example of how to integrate Lucene with Spring ?

Posted by Irfan on October 20, 2005 at 10:34 PM MDT #

Thomas Gaudin (an AppFuse committer and excellent tutorial author) has written a tutorial titled "Lucene integration with Spring and Hibernate". Hopefully this will provide what you're looking for.

Posted by Matt Raible on October 20, 2005 at 10:40 PM MDT #

Thanks for your reply. We have already seen his tutorial. But this does not meet our expectation. It's sort of a clumpsy example, hard to understand. We need a complete example like Appfuse.
You mentioned in this blog "I've been thinking about integrating Lucene into AppFuse (or at least providing a tutorial) for quite some time. Hopefully this post will serve as a starting point when I do", are you likely to integrate this in your "Spring Live" book too? If so, that would be great!! When are you coming up with your updated Appfuse project with Lucene interated?

Posted by M Chisty on October 22, 2005 at 03:14 AM MDT #

M Chisty: There are many things on the roadmap for the next AppFuse release. Unfortunately, Lucene integration is not one of them. To be perfectly honest, I haven't needed it in any of my projects (to date), though I do agree it would be a nice feature.

I don't plan on covering Lucene in Spring Live, but you might checkout Lucene in Action. As far as an AppFuse-based project using Lucene - you might checkout AtLeap.

Posted by Matt Raible on October 22, 2005 at 09:30 AM MDT #

I used Hibernate Annotations Lucene Integration to do the job, it's great.

Posted by AlexCheng on February 10, 2006 at 01:46 AM MST #

Alex, I am using Java 1.4.x and I want to integrate Hibernate search (Lucene) using Hibernate annotations but annotations require java 1.5. Can you please provide sequence steps required for using Hibernate annotations using Java 1.4 and XDoclet ?

Posted by shanmugam golla on January 18, 2007 at 12:46 AM MST #

what are the steps needed to integrate lucene with hibernate?

Posted by on February 12, 2007 at 01:05 AM MST #

Tyr visiting this site

Posted by suresh on July 24, 2008 at 01:03 AM MDT #

Post a Comment:
  • HTML Syntax: Allowed