-->
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 integration-search results sorting
PostPosted: Tue Feb 13, 2007 12:19 am 
Newbie

Joined: Thu Feb 08, 2007 5:10 pm
Posts: 4
Code:
org.apache.lucene.QueryParser parser = new QueryParser("title", new StopAnalyzer() );

org.hibernate.lucene.search.Query luceneQuery = parser.parse( "summary:Festina Or brand:Seiko" );
org.hibernate.Query fullTextQuery = fullTextSession.createFullTextQuery( luceneQuery );

List result = fullTextQuery.list(); //return a list of managed objects


after we get the result back as a list of objects(they are domain objects, right?) how can we investigate their the hits(relevancy)? I am expecting each object will have different hits in which they are ordered. But since they are domain objects i couldn't think of a way to access their hits unless there are some kind of other seach that return a collection of sorted results?

Can anyone shed some lights?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 15, 2007 7:16 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Hi hr,
The solution today is to do the query in native Lucene.
I will provide something in the future but I haven't thought through this problem, proposal welcome :-)
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-6

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 24, 2007 2:07 pm 
Newbie

Joined: Mon Mar 26, 2007 7:27 am
Posts: 9
emmanuel wrote:
Hi hr,
The solution today is to do the query in native Lucene.
I will provide something in the future but I haven't thought through this problem, proposal welcome :-)
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-6


Hi,

Just to share some thoughts:

I have a similar need. For me a more "open access" to Lucene APIs would be great. Perhaps it is possible to use Lucene directly, similar to how one can go directly to SQL in cases where it is really needed. If this is possible, some hints on problems/solutions in documentation would be great.

In my case I eventually would like to extend Lucene substantially by combining it with some other techniques. For example, using vector-space-weights on terms with statistical methods and so forth.

For those cases one really like to have access to Lucene, for example Hits-objects.

B R Lars


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 25, 2007 7:04 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
ContextHelper.getSearchFactory(session).getDirectoryProvider(entityClass).getDirectory()

gives you the Lucene Directory. From here you can do what ever pleases you :-)

_________________
Emmanuel


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.