-->
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.  [ 2 posts ] 
Author Message
 Post subject: Filter results more relevant
PostPosted: Wed Dec 11, 2013 7:27 pm 
Newbie

Joined: Sat Nov 09, 2013 7:53 pm
Posts: 3
Hi,
I need to filter the most relevant results. For example, a search for concrete and museum returns these results:

Concrete
painted concrete
Concrete with iron
Museum,
The Metropolitan Museum of Art.

it is possible make a filter to return only the following result: Concrete and Museum?

I'm using StandardTokenizerFactory.


Top
 Profile  
 
 Post subject: Re: Filter results more relevant
PostPosted: Sun Dec 15, 2013 8:07 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
by default Lucene will always return the "most relevant" results on the top. That means that in your example "painted concrete" is having a higher scoring factor than "Museum".
That's probably correct based on the scoring formula, but I understand it's not what you want. The explanation is probably that "Concrete" has a higher value than "Museum".. I would suggest to project explanations of the scoring so you can better understand why this is the case. See FullTextQuery.EXPLANATION in http://docs.jboss.org/hibernate/search/4.5/reference/en-US/html_single/#projections

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