Have you tried using the explain method on a Searcher and examining the results?

Best
Erick

On Thu, Jun 2, 2011 at 3:51 PM, Clemens Wyss <clemens...@mysign.ch> wrote:
> I have a minimal unit test in which I add three documents to an index. The 
> documents have two fields "year" and "descritpion".
> doc1(year = "2007", desc = "text with 2007 and 2009")
> doc2(year = "2009", desc = "text with 2007 and 2009")
> doc3(year = "2008", desc = "text with 2007 and 2009")
>
> To search I use a BooleanQuery with a TermQuery (very high boosted), a 
> PrefixQuery (high boosted) and a WildcardQuery (normal boost).
>
> when I search for "2007" I get
> doc1
> doc2
> doc3
>
> when I search for "2009" I get
> doc2
> doc1
> doc3
>
> Looks like the "exact match" on year is rated higher, which is good. Now when 
> I set the boost factor of year to 2f I get the same results. But when I set 
> the boost factor of year to 10f the order is inversed, i.e. the matching on 
> desc is rated higher.
>
> How come?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>
>

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

Reply via email to