-->
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: Reslts by Relevance
PostPosted: Mon Feb 16, 2009 5:04 am 
Beginner
Beginner

Joined: Fri Sep 08, 2006 7:29 am
Posts: 36
Hi,

I have recently started using Hibernate Search and have found it Great!!!

I have read at a number of places including "HS in Action" that the results returned are sorted by Relevance. What does this mean? Does this mean that if I am searching through names for "John", then the results would be sorted as follows.

John A
John B
John C
A John
B John
C John
A A John
A B John

and so on.

I hope I am making myself clear. The results are sorted not only based on the position of the search term but also by last name(where applicable) or first name (where applicable)...

I tried a simple example, but the results were not as above, maybe I am making some mistake.

If this is not the default behavior, is it possible to achieve this using Hibernate Search?

Any help would be highly appreciated.

Regards,
Shardul.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 16, 2009 5:26 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
well one of the coolest thing is that unlike DB-level proprietary full text engines you can tune your own notion of what "Relevance" should mean with quite a lot of flexibility. The default relevante is very nice, but in this applications you want to be able to hint the system about what you think your particular use case should return, what your users are expecting to find.

The default "Relevance" concept is not about the position of the terms being at the beginning of the text nor about lexicographical ordering, it's about the terms you are searching for are more frequently used in one text, how good they match, how far they are from each other (supposing larger natural text sentences); in case of more than one search term, you will get first the results containing most frequently both terms, and even a better score if the two terms are used near each other.

In the book you really want to take a look to chapter 12: scoring and boosting of results. It has code examples and lots of good explanations about how it's done and how to best tune it to your needs.

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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 16, 2009 5:54 am 
Beginner
Beginner

Joined: Fri Sep 08, 2006 7:29 am
Posts: 36
Thanks for your inputs....am going through chapter 12, would get back in case I have any questions.

_________________
Shardul
Please Rate.


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.