Thanks a lot Yonik.

Effectively, I had something like that in my code: 

SchemaField sfield = _schema.getFieldOrNull(fieldName);
if (sfield != null)
doc.add(sfield.createField(nodeValue, 0));

I set the boost value to 1 and it works now…

Thanks again,

  Cédric


Yonik Seeley wrote:
> 
> Looks like the norm for the doc for that field is 0... did you perhaps
> boost the field or document by 0 when indexing?
> 
> -Yonik
> 
> On Mon, Nov 24, 2008 at 9:59 AM, Cedric Houis <[EMAIL PROTECTED]>
> wrote:
>>
>> Hi Solr team.
>>
>> I've got a question about scoring; when we make a search like this: "bush
>> obama^9", we always have a 0.0 score.
>> Should we not have a higher score we the document contains both "bush"
>> and
>> "obama"?
>>
>> Our default search filed is defined like this:
>> <field name="nFullText" type="text" indexed="true" stored="true"
>> termVectors="true"/>
>>
>> Here is debug result:
>> <lst name="debug">
>>    <str name="rawquerystring">bush obama^9</str>
>>    <str name="querystring">bush obama^9</str>
>>    <str name="parsedquery">nFullText:bush nFullText:obama^9.0</str>
>>    <str name="parsedquery_toString">nFullText:bush
>> nFullText:obama^9.0</str>
>>    <lst name="explain">
>>        <str name="news_584440">
>>            0.0 = (MATCH) product of:
>>            0.0 = (MATCH) sum of:
>>            0.0 = (MATCH) weight(nFullText:bush in 74), product of:
>>            0.06187806 = queryWeight(nFullText:bush), product of:
>>            3.8956826 = idf(docFreq=16003, numDocs=289606)
>>            0.015883753 = queryNorm
>>            0.0 = (MATCH) fieldWeight(nFullText:bush in 74), product of:
>>            2.0 = tf(termFreq(nFullText:bush)=4)
>>            3.8956826 = idf(docFreq=16003, numDocs=289606)
>>            0.0 = fieldNorm(field=nFullText, doc=74)
>>            0.5 = coord(1/2)
>>        </str>
>>        <str name="news_582087">
>>            0.0 = (MATCH) product of:
>>            0.0 = (MATCH) sum of:
>>            0.0 = (MATCH) weight(nFullText:bush in 148), product of:
>>            0.06187806 = queryWeight(nFullText:bush), product of:
>>            3.8956826 = idf(docFreq=16003, numDocs=289606)
>>            0.015883753 = queryNorm
>>            0.0 = (MATCH) fieldWeight(nFullText:bush in 148), product of:
>>            1.0 = tf(termFreq(nFullText:bush)=1)
>>            3.8956826 = idf(docFreq=16003, numDocs=289606)
>>            0.0 = fieldNorm(field=nFullText, doc=148)
>>            0.5 = coord(1/2)
>>        </str>
>>        <str name="news_583532">
>>            0.0 = (MATCH) product of:
>>            0.0 = (MATCH) sum of:
>>            0.0 = (MATCH) weight(nFullText:bush in 170), product of:
>>            0.06187806 = queryWeight(nFullText:bush), product of:
>>            3.8956826 = idf(docFreq=16003, numDocs=289606)
>>            0.015883753 = queryNorm
>>            0.0 = (MATCH) fieldWeight(nFullText:bush in 170), product of:
>>            2.0 = tf(termFreq(nFullText:bush)=4)
>>            3.8956826 = idf(docFreq=16003, numDocs=289606)
>>            0.0 = fieldNorm(field=nFullText, doc=170)
>>            0.5 = coord(1/2)
>>        </str>
>>        <str name="news_583036">
>>            0.0 = (MATCH) product of:
>>            0.0 = (MATCH) sum of:
>>            0.0 = (MATCH) weight(nFullText:bush in 172), product of:
>>            0.06187806 = queryWeight(nFullText:bush), product of:
>>            3.8956826 = idf(docFreq=16003, numDocs=289606)
>>            0.015883753 = queryNorm
>>            0.0 = (MATCH) fieldWeight(nFullText:bush in 172), product of:
>>            1.4142135 = tf(termFreq(nFullText:bush)=2)
>>            3.8956826 = idf(docFreq=16003, numDocs=289606)
>>            0.0 = fieldNorm(field=nFullText, doc=172)
>>            0.5 = coord(1/2)
>>        </str>
>>        <str name="news_582865">
>>            0.0 = (MATCH) product of:
>>            0.0 = (MATCH) sum of:
>>            0.0 = (MATCH) weight(nFullText:bush in 185), product of:
>>            0.06187806 = queryWeight(nFullText:bush), product of:
>>            3.8956826 = idf(docFreq=16003, numDocs=289606)
>>            0.015883753 = queryNorm
>>            0.0 = (MATCH) fieldWeight(nFullText:bush in 185), product of:
>>            1.0 = tf(termFreq(nFullText:bush)=1)
>>            3.8956826 = idf(docFreq=16003, numDocs=289606)
>>            0.0 = fieldNorm(field=nFullText, doc=185)
>>            0.5 = coord(1/2)
>>        </str>
>>    </lst>
>> </lst>
>>
>> Every explanation is welcome! Thanks in advance,
>>
>> Regards,
>>
>>  Cédric
>> --
>> View this message in context:
>> http://www.nabble.com/Score-always-0.0-tp20662445p20662445.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Score-always-0.0-tp20662445p20665969.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to