You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by "Balaji.A" <re...@gmail.com> on 2010/10/28 17:18:37 UTC

Wrong ordering

Hi All,

I have one basic query. Below given is the output of my query with debug
status on. In my result i get document with lowest score comes above the
document with highest score. So my document is returned in the order as
follows

Doc1 (scoring 12.52)
Doc2 (scoring 2.52)
Doc3 (scoring 254)

Could anyone let me know is there any factor which can affect the ordering?
I am sure that I didn't specify any sorting techniques.

12.52 = (MATCH) sum of:
  12.52 = (MATCH) product of:
    25.04 = (MATCH) sum of:
      25.04 = (MATCH) max plus 0.01 times others of:
        4.0 = (MATCH) weight(content:cup^4.0 in 497), product of:
          4.0 = queryWeight(content:cup^4.0), product of:
            4.0 = boost
            1.0 = idf(docFreq=272, maxDocs=85126)
            1.0 = queryNorm
          1.0 = (MATCH) fieldWeight(content:cup in 497), product of:
            1.0 = tf(termFreq(content:cup)=1)
            1.0 = idf(docFreq=272, maxDocs=85126)
            1.0 = fieldNorm(field=content, doc=497)
        25.0 = (MATCH) weight(title:cup^25.0 in 497), product of:
          25.0 = queryWeight(title:cup^25.0), product of:
            25.0 = boost
            1.0 = idf(docFreq=14, maxDocs=85126)
            1.0 = queryNorm
          1.0 = (MATCH) fieldWeight(title:cup in 497), product of:
            1.0 = tf(termFreq(title:cup)=1)
            1.0 = idf(docFreq=14, maxDocs=85126)
            1.0 = fieldNorm(field=title, doc=497)
    0.5 = coord(1/2)

----------------------------------------------------------

2.52 = (MATCH) sum of:
  2.52 = (MATCH) product of:
    5.04 = (MATCH) sum of:
      5.04 = (MATCH) max plus 0.01 times others of:
        4.0 = (MATCH) weight(content:cup^4.0 in 425), product of:
          4.0 = queryWeight(content:cup^4.0), product of:
            4.0 = boost
            1.0 = idf(docFreq=272, maxDocs=85126)
            1.0 = queryNorm
          1.0 = (MATCH) fieldWeight(content:cup in 425), product of:
            1.0 = tf(termFreq(content:cup)=1)
            1.0 = idf(docFreq=272, maxDocs=85126)
            1.0 = fieldNorm(field=content, doc=425)
        5.0 = (MATCH) weight(description:cup^5.0 in 425), product of:
          5.0 = queryWeight(description:cup^5.0), product of:
            5.0 = boost
            1.0 = idf(docFreq=55, maxDocs=85126)
            1.0 = queryNorm
          1.0 = (MATCH) fieldWeight(description:cup in 425), product of:
            1.0 = tf(termFreq(description:cup)=1)
            1.0 = idf(docFreq=55, maxDocs=85126)
            1.0 = fieldNorm(field=description, doc=425)
    0.5 = coord(1/2)

---------------------------------------------------------------------------------

254.2075 = (MATCH) sum of:
  4.02 = (MATCH) sum of:
    2.01 = (MATCH) max plus 0.01 times others of:
      1.0 = (MATCH) fieldWeight(ncontent:ryder in 5623), product of:
        1.0 = tf(termFreq(ncontent:ryder)=1)
        1.0 = idf(docFreq=61, maxDocs=85126)
        1.0 = fieldNorm(field=ncontent, doc=5623)
      2.0 = (MATCH) weight(ndescription:ryder^2.0 in 5623), product of:
        2.0 = queryWeight(ndescription:ryder^2.0), product of:
          2.0 = boost
          1.0 = idf(docFreq=17, maxDocs=85126)
          1.0 = queryNorm
        1.0 = (MATCH) fieldWeight(ndescription:ryder in 5623), product of:
          1.0 = tf(termFreq(ndescription:ryder)=1)
          1.0 = idf(docFreq=17, maxDocs=85126)
          1.0 = fieldNorm(field=ndescription, doc=5623)
    2.01 = (MATCH) max plus 0.01 times others of:
      1.0 = (MATCH) fieldWeight(ncontent:cup in 5623), product of:
        1.0 = tf(termFreq(ncontent:cup)=1)
        1.0 = idf(docFreq=335, maxDocs=85126)
        1.0 = fieldNorm(field=ncontent, doc=5623)
      2.0 = (MATCH) weight(ndescription:cup^2.0 in 5623), product of:
        2.0 = queryWeight(ndescription:cup^2.0), product of:
          2.0 = boost
          1.0 = idf(docFreq=57, maxDocs=85126)
          1.0 = queryNorm
        1.0 = (MATCH) fieldWeight(ndescription:cup in 5623), product of:
          1.0 = tf(termFreq(ndescription:cup)=1)
          1.0 = idf(docFreq=57, maxDocs=85126)
          1.0 = fieldNorm(field=ndescription, doc=5623)
  250.1875 = (MATCH) max plus 0.01 times others of:
    250.0 = weight(ndescription_em:"ryder cup"~100^200.0 in 5623), product
of:
      400.0 = queryWeight(ndescription_em:"ryder cup"~100^200.0), product
of:
        200.0 = boost
        2.0 = idf(ndescription_em: ryder=13 cup=43)
        1.0 = queryNorm
      0.625 = fieldWeight(ndescription_em:"ryder cup" in 5623), product of:
        1.0 = tf(phraseFreq=1.0)
        2.0 = idf(ndescription_em: ryder=13 cup=43)
        0.3125 = fieldNorm(field=ndescription_em, doc=5623)
    18.75 = weight(ncontent_em:"ryder cup"~100^100.0 in 5623), product of:
      200.0 = queryWeight(ncontent_em:"ryder cup"~100^100.0), product of:
        100.0 = boost
        2.0 = idf(ncontent_em: ryder=56 cup=280)
        1.0 = queryNorm
      0.09375 = fieldWeight(ncontent_em:"ryder cup" in 5623), product of:
        1.0 = tf(phraseFreq=1.0)
        2.0 = idf(ncontent_em: ryder=56 cup=280)
        0.046875 = fieldNorm(field=ncontent_em, doc=5623)

Many Thanks !
Balaji
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Wrong-ordering-tp1786985p1786985.html
Sent from the Lucene - General mailing list archive at Nabble.com.

Re: Wrong ordering

Posted by Chris Hostetter <ho...@fucit.org>.
: I have one basic query. Below given is the output of my query with debug
: status on. In my result i get document with lowest score comes above the
: document with highest score. So my document is returned in the order as
: follows

nothing about your question makes it clear if you are using Solr or 
Lucene-Java directly.

If you are using Solr, then we need to know what your request URL looks 
like, and how your request handler is configured.

If you are using Lucene-Java then we need to see the code you are using to 
execute the search.

One extremeley simple explanation might be that you aren't sorting on 
score -- but that's just a shot i nthe dark given the limited info you 
have provided about how you are getting these results.


-Hoss