-->
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.  [ 5 posts ] 
Author Message
 Post subject: Lucene integration
PostPosted: Fri Feb 09, 2007 2:20 pm 
Newbie

Joined: Fri Feb 02, 2007 1:24 pm
Posts: 2
Hello,

I'm trying to port hibernate lucene support to SOLR. Digging through the code, I found out the lucene index is updated after transaction is successfully completed.

This ensures that in the case of a rollback, the index is not artificially updated.

However, wouldn't it be nice if we could push the integration further, such as that in the case of a Lucene index update failure, the transaction is rolled back? Basically, the lucene update should be included in the transaction.

This could be done using index updates for post-insert, post-update, post-delete events. But then the nice mechanism of processing queues of index update messages would be lost (another reason would be that if db operation fails, index is inconsistent).

Implementing the Synchronization interface, unfortunately is not helpful - it does not allow to rollback a transaction. So my question is: can this be achieved? and how ?

Thanks,
Marius Hanganu


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 10, 2007 2:11 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
It can only be achieve by some sort of 2 Phase-Commit protocol, but it's a lot of work.
Do you really think DB transaction should rollback is case indexation is failing? In most systems, Indexation is a nice-to-have feature while a DB operation is a must-have. You can always try and reindex.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 10, 2007 2:14 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
BTW, what do ou mean by
Quote:
I'm trying to port hibernate lucene support to SOLR.


I thought about using SOLR as the back-end Hibernate Search as an alternative to direct Lucene calls, this might be (at least partially) possible. But I don't know how useful such a feature would be

_________________
Emmanuel


Top
 Profile  
 
 Post subject: SOLR as indexing engine
PostPosted: Mon Feb 12, 2007 2:18 am 
Newbie

Joined: Fri Feb 02, 2007 1:24 pm
Posts: 2
We use SOLR as an indexing engine for our application, and db sync with solr is required.

When I said "porting" I should have probably said "small adaptation", since I'm using far lesser features than the ones in the engine you've wrote.

The use case is that someone decided for SOLR as indexing engine. Deciding btw SOLR and lucene is another topic (basically related to the features SOLR provides).

emmanuel wrote:
BTW, what do ou mean by
Quote:
I'm trying to port hibernate lucene support to SOLR.


I thought about using SOLR as the back-end Hibernate Search as an alternative to direct Lucene calls, this might be (at least partially) possible. But I don't know how useful such a feature would be


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 1:03 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
OK Cool.
Tell me how you did it when you're done, That might be a nice additional feature to add to Hibernate Search.

BTW, can you describe the top 5 features that made you choose SOLR instead of straight Lucene?

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.