-->
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 Search in Class Level It is possible?
PostPosted: Thu Nov 20, 2008 1:36 am 
Newbie

Joined: Mon Mar 10, 2008 9:18 am
Posts: 3
Location: Chennai
hi,

i'm implementing Hibernate Search in my application, i want know Some thing about Class Level Search. I saw the tutorials it gives the property/field name that equal to "someText", is ok. i want to search "someText" in the complete class without mention the filed/property name.

Code:


MultiFieldQueryParser parser = new MultiFieldQueryParser( new String[]{"name", "address", "address2"},
           new StandardAnalyzer());
       org.apache.lucene.search.Query query = parser.parse( "someText" );



This can be done the key word " like " in the dblevel. Some one help to guide me.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 23, 2008 2:42 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
As far as I know this is not currently possible, you should list all field names.
Is this an important feature you need for some good reason?

We could add the feature, but you should persuade Emmanuel (proj lead) about the usefulness of this.

I'm not sure how you could build such a query using SQL, could you show that?
It would be really slow for sure.

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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 24, 2008 11:06 am 
Newbie

Joined: Mon Mar 10, 2008 9:18 am
Posts: 3
Location: Chennai
Hi s.grinovero thanks for your kind replay,

Here, We're developing a generic component for search with multiple tables. In our case, we want to
search a text in all the tables and returns a list of record that matches the given text. This text may also present
in more than one table. So the returned list should hold the record(of different table) containing text whereever it
matches.

Also, i want to know what is the difference between normal database indexing and lucene + Hibernate Search.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 24, 2008 12:33 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi, what dobes is suggesting in this other thread is a good solution for your case I think: http://forum.hibernate.org/viewtopic.php?t=992537&start=0&postdays=0&postorder=asc&highlight=

your second question is much more complex; a very good insight you can read in the book; basically the difference is that Lucene is not a DB, so you can change whatever DB you want (supported by hibernate, this a lot) and it is a very specialized and flexible library.
Also Hibernate and other similar tools don't support "proprietary extensions" to SQL to use full text functions such as the ones you find in MySQL or Oracle DBs, meaning you can't use the fulltext functions from you OO designed software.

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


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.