lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Lee <ag...@earthlink.net>
Subject Re: trying to boost a phrase higher than its individual words
Date Fri, 28 Oct 2005 20:54:02 GMT
On Oct 28, 2005, at 10:38 AM, Erik Hatcher wrote:
> So in this case a matching document must have both terms?  Or could  
> it just have one or the other?  If it must have both, you could try  
> a PhraseQuery with a slop of Integer.MAX_VALUE.  PhraseQuery scores  
> closer matches higher.

Good to know, thanks.  I saw references to slop but didn't know what  
they meant.  I'll see if this is one way I could solve my problem.

> But as Chris suggested - check the IndexSearcher.explain() for some  
> documents you feel should be ranked higher and work from there.   
> You're on the right track, but some tuning appears necessary.

Okay, I looked at the explanations and realized part of the problem  
was that I was applying a sort field to the search results, which I  
had forgotten.  So of course that affected the display order, duh.   
But I also do need to do some tuning, because I'm adding other stuff  
to the query that is also skewing the ranking.

It took me a while to figure out the differences between the  
searcher.explain() example in LIA and the latest changes to the API.   
It was a little annoying that I couldn't find a way to get plain text  
output -- it seems to be only HTML now.  Finally I wrote a  
convenience method that dumps the HTML to a file, which I view in a  
browser.

Thanks, Chris and Erik!

--Andy


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message