-->
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.  [ 3 posts ] 
Author Message
 Post subject: [hibernate search] SQL or hibernate search, which is better?
PostPosted: Wed Jun 18, 2008 2:21 am 
Beginner
Beginner

Joined: Mon Dec 17, 2007 11:08 pm
Posts: 47
hi, I just recently study about hibernate search, great tool for simplify search in database.

so my question is, how do we decide to choose which method for search ? SQL or directly using hibernate search, any advantages and disadvantages ?
(I think is sound like compare hibernate and JDBC :) )

In which circumstance we should use one instead of the other ?

Say i had a search that require some number comparison like price etc, should I use SQL directly or use Hibernate search with range filter (like the hibernate search doc recommended)?

how the performance, which one is faster ?

any idea ?

kiwi

_________________
happy hacking !


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 18, 2008 4:21 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hello,

Quote:
In which circumstance we should use one instead of the other ?

the answer is of course "it depends"; you should understand what a fulltext search is;
Hibernate Search is most suitable when you want to search in free text, in particular when you need features as "text should contain some of these words" or "a phrase which looks like this one", a bit "search engine like".
If you only have to check against price ranges, then you should use standard queries.

Quote:
how the performance, which one is faster ?

The performance for fulltext searches using Search is great, but hey are difficult to compare as they actually solve different problems. There are some cases in which you could do the same stuff with both, but they are limited and depending on the use case it should be obvious which one is more appropriate; the most appropriate will always be the best performer for the task.

I would suggest you to get a better understanding about fulltext searches, and all pros and cons with the new book which is being released:
http://blog.emmanuelbernard.com/2008/02/hibernate-search-in-action-book.html

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 18, 2008 4:41 am 
Beginner
Beginner

Joined: Mon Dec 17, 2007 11:08 pm
Posts: 47
ok.. thx !

kiwi

_________________
happy hacking !


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