You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ng Vinny <ng...@gmail.com> on 2008/11/18 18:02:48 UTC

compare scores across queries

Hi all,

I am wondering if the raw scores obtained from HitCollector can be used to
compare relevance of documents to different queries?

E.g.  two  phrase queries are issued : (PQ1: "Barack Obama"  and PQ2:  "John
McCain"). if a document (doc1) belongs to the result sets of both queries
and has the raw score of 5 for PQ1 and 3 for PQ2, can  I say that doc1 is
more relevant to "Barack Obama" than to "John McCain"?

There have been some previous discussions about this at [1,2]. On the other
hand, the javadoc of the Similarity class says "*queryNorm(q) * is a
normalizing factor used to make scores between queries comparable. This
factor does not affect document ranking (since all ranked documents are
multiplied by the same factor), but rather just attempts to make scores from
different queries (or even different indexes) comparable. "

Please advise.

Thanks.
Ng.

[1] http://thread.gmane.org/gmane.comp.jakarta.lucene.user/10760/focus=10810
[2]
http://www.gossamer-threads.com/lists/lucene/java-user/35051?search_string=compare%20score%20across%20queries;#35051
[3]
http://hudson.zones.apache.org/hudson/job/Lucene-trunk/javadoc//org/apache/lucene/search/Similarity.html

Modifiing the values of stored non indexed fields

Posted by Diego Cassinera <di...@mercadolibre.com>.
Is there a way to change the value of stored fields that have not been
indexed without having to delete the document and re-index it.  The fields I
need to change will always have the same size, however the value may change
every so often.  I want to do this to avoid hitting my rdbms to display the
results of a search.

Thank You
Diego Cassinera
Diego.cassinera@mercadolibre.com


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


RE: Modifiing the values of stored non indexed fields

Posted by Diego Cassinera <di...@mercadolibre.com>.
Sorry,  I just noticed that my email client decided his answer was junk
mail.  Regardless thank you both for your reply.

Diego


-----Mensaje original-----
De: Erick Erickson [mailto:erickerickson@gmail.com] 
Enviado el: jueves, 20 de noviembre de 2008 10:47 a.m.
Para: java-user@lucene.apache.org
Asunto: Re: Modifiing the values of stored non indexed fields

OK, I'll bite. What's unclear about Michael's response
to this question when you asked it yesterday? The
answer is still no today.

Erick

On Thu, Nov 20, 2008 at 9:32 AM, Diego Cassinera <
diego.cassinera@mercadolibre.com> wrote:

> Is there a way to change the value of stored fields that have not been
> indexed without having to delete the document and re-index it.  The fields
> I
> need to change will always have the same size, however the value may
change
> every so often.  I want to do this to avoid hitting my rdbms to display
the
> results of a search.
>
> Thank You
> Diego Cassinera
> Diego.cassinera@mercadolibre.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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


Re: Modifiing the values of stored non indexed fields

Posted by Erick Erickson <er...@gmail.com>.
OK, I'll bite. What's unclear about Michael's response
to this question when you asked it yesterday? The
answer is still no today.

Erick

On Thu, Nov 20, 2008 at 9:32 AM, Diego Cassinera <
diego.cassinera@mercadolibre.com> wrote:

> Is there a way to change the value of stored fields that have not been
> indexed without having to delete the document and re-index it.  The fields
> I
> need to change will always have the same size, however the value may change
> every so often.  I want to do this to avoid hitting my rdbms to display the
> results of a search.
>
> Thank You
> Diego Cassinera
> Diego.cassinera@mercadolibre.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: compare scores across queries

Posted by Grant Ingersoll <gs...@apache.org>.
No, they should not be compared.  Scores are only relative to each  
other for that given input query, despite what the queryNorm docs  
say.  The queryNorm was an attempt at doing it, but my understanding  
of the research still indicates they are not comparable.

-Grant

On Nov 18, 2008, at 12:02 PM, Ng Vinny wrote:

> Hi all,
>
> I am wondering if the raw scores obtained from HitCollector can be  
> used to
> compare relevance of documents to different queries?
>
> E.g.  two  phrase queries are issued : (PQ1: "Barack Obama"  and  
> PQ2:  "John
> McCain"). if a document (doc1) belongs to the result sets of both  
> queries
> and has the raw score of 5 for PQ1 and 3 for PQ2, can  I say that  
> doc1 is
> more relevant to "Barack Obama" than to "John McCain"?
>
> There have been some previous discussions about this at [1,2]. On  
> the other
> hand, the javadoc of the Similarity class says "*queryNorm(q) * is a
> normalizing factor used to make scores between queries comparable.  
> This
> factor does not affect document ranking (since all ranked documents  
> are
> multiplied by the same factor), but rather just attempts to make  
> scores from
> different queries (or even different indexes) comparable. "
>
> Please advise.
>
> Thanks.
> Ng.
>
> [1] http://thread.gmane.org/gmane.comp.jakarta.lucene.user/10760/focus=10810
> [2]
> http://www.gossamer-threads.com/lists/lucene/java-user/35051?search_string=compare%20score%20across%20queries;#35051
> [3]
> http://hudson.zones.apache.org/hudson/job/Lucene-trunk/javadoc//org/apache/lucene/search/Similarity.html

--------------------------
Grant Ingersoll

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ











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