Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

Boosting a query

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


angelica at cnptia

Jan 20, 2008, 5:13 PM

Post #1 of 2 (4271 views)
Permalink
Boosting a query

I am trying to submit a query to Lucene with just one term trying to
understand how the boost of a term influences the final document score: for
example "computer" and "computer^5" (using query.setBoost()). Lucene
returns the same documents with the same document score values for both
queries. When I look at searcher.explain() the explanation is the same for
both queries for each document.

In Similarity class I saw that the score function score(q,d) has a
multiplying factor t.getBoost() and then I thought that boosting a query
term would modify the final document score for the query. But it does not.
If the boost does not change the final document score what is it utility? I
think I am missing something.

Thanks, Angelica.




---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


yonik at apache

Jan 20, 2008, 5:31 PM

Post #2 of 2 (3934 views)
Permalink
Re: Boosting a query [In reply to]

Boosts on query clauses are relative to other clauses. To see
boosting really work try looking at
foo bar
vs
foo bar^10

-Yonik

On Jan 20, 2008 8:13 PM, <angelica [at] cnptia> wrote:
> I am trying to submit a query to Lucene with just one term trying to
> understand how the boost of a term influences the final document score: for
> example "computer" and "computer^5" (using query.setBoost()). Lucene
> returns the same documents with the same document score values for both
> queries. When I look at searcher.explain() the explanation is the same for
> both queries for each document.
>
> In Similarity class I saw that the score function score(q,d) has a
> multiplying factor t.getBoost() and then I thought that boosting a query
> term would modify the final document score for the query. But it does not.
> If the boost does not change the final document score what is it utility? I
> think I am missing something.
>
> Thanks, Angelica.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
> For additional commands, e-mail: java-user-help [at] lucene
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.