-->
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] hibernate search or SQL for performance ?
PostPosted: Tue Jul 22, 2008 3:54 am 
Beginner
Beginner

Joined: Mon Dec 17, 2007 11:08 pm
Posts: 47
hi, I plan to add a search function to my website.

The parameters is consist of text and number (compare number higher, smaller, between), which is the more suitable solution this use case ?

I found that both way also can implement (not so difficult), but wondering which is the better approach on performance and code maintaining perspective .(like able to add more search parameters or modify the parameter etc).

If using hibernate search, It seem like a lot work to be done in compare numbers, since Lucene is only know string.

any idea ?

kiwi
----
happy hacking !

_________________
happy hacking !


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 22, 2008 5:17 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
yes you are right if all search parameters are numbers then Lucene (and Hibernate Search) would be more difficult to use and maintain than plain HQL/SQL;
However it really rocks if you need (or foresee you will need) to add full text search capabilities.
You may like the book (in the banner of the forum) for good guidelines from Emmanuel, it's not published yet but you can already download most chapters you're needing for this type of decisions.

regards,

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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 22, 2008 5:28 am 
Beginner
Beginner

Joined: Mon Dec 17, 2007 11:08 pm
Posts: 47
hi, thx for rely.

Indeed I like to use Lucene for it powerful features (and lazy to come out my half bake solution, or worst implementation :) ). maybe i will look at the filter.

not sure if hibernate search will add support for SQL + Lucene search in future like this :

//get the easy job in SQL or HSQL
ResultSet rs = session.createSQL("select * from table where xx <3 and yy > 4;");

//then apply Lucene search on the Result set.
FullTextQuery hibQuery = fullTextSession.createFullTextQuery( query, rs, SomeClass.class);

then it will be easy a lot to implement search on specific item.

kiwi
----
happy hacking !

_________________
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.