-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Hibernate + Lucene
PostPosted: Wed May 25, 2005 4:07 am 
Newbie

Joined: Tue May 24, 2005 8:38 am
Posts: 7
Has anyone ever used Lucene with Hibernate?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 25, 2005 4:22 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
I believe there is an article somewhere on TheServerSide or OnJava or JavaWorld on this, but unfortunately I don't know where :-(.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 25, 2005 4:46 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
Maybe bind Lucene with Hibernate through Spring:
- http://www.jroller.com/page/raible/20050403
- http://opensource.atlassian.com/project ... owse/MOD-4


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 25, 2005 10:42 am 
Regular
Regular

Joined: Tue Nov 23, 2004 7:42 am
Posts: 82
Location: London, England
Okay okay, I'll bite!

This is what I did (I didn't do what they did in the link I posted in your previous topic):

* I have a LuceneUtil class which is a singleton that manages the index (adding, updating, deleting, searching).

* At my business layer (not the DAO layer just in case I reimplement it in something else) I call the various add/update/delete methods to maintain the index.

* My search operation returns an array of IDs which I then pull out of the database.

Note, I only index one database table. If you wish to index more than one then you'll need a slightly more sophisticated method. If you've used Lucene then you should find it relatively easy to implement. I hacked mine out in a few hours having previously had no Lucene experience.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.