Cutezjz / galagosearch

Automatically exported from code.google.com/p/galagosearch
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

#weight: One line change needed to ScaleIterator #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run batch query on CACM corpus with

<parameters>
     <query>
        <number>CACM1a</number>
        <text>#combine(articles TSS jolly)</text>
     </query>
     <query>
        <number>CACM-1b</number>
        <text> #weight(1.0 articles 350.0 TSS 2.8 jolly)
</text>
     </query>
 <query>
        <number>CACM-1c</number>
        <text> #weight(1.0 articles 1.0 TSS 2.8 jolly)
</text>
     </query>
  </parameters>

2. Results and scores will not be sensitive to weights

What is the expected output? What do you see instead?

Results should vary with weights

What version of the product are you using? On what operating system?

svn revision 123 on Mac and Unix

Please provide any additional information below.

A simple one-line fix to 

org.galagosearch.core.retrieval.structured.ScaleIterator.java suffices. 

Change

weight = parameters.get("weight", 1.0);

to 

weight = parameters.get("default", 1.0);

N.B. This is fixing the SYMPTOM, not the problem. The problem is higher up, 
when the
parameters are being created. They should have "weight" as a key, but they do 
not.

Original issue reported on code.google.com by christop...@gmail.com on 4 Mar 2010 at 10:57

GoogleCodeExporter commented 8 years ago
Thanks for the bug!

Original comment by trevor.s...@gmail.com on 5 Mar 2010 at 6:47

GoogleCodeExporter commented 8 years ago

Resolved - weight is now transformed into a combine (with weights)

#weight( w0 a w1 b ) --> #combine:0=w0:1=w1( a b )

Original comment by sjh...@gmail.com on 21 Jun 2011 at 3:28