You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Craig Stadler <cs...@hotmail.com> on 2011/10/19 00:38:17 UTC

score based on unique words matching???

>> Heres my problem :
>>
>> field1 (text) - subject
>> q=david bowie changes
>>
>> Problem : If a record mentions david bowie a lot, it beats out something 
>> more relevant (more unique matches) ...
>>
>> A. (now appearing david bowie at the cineplex 7pm david bowie goes on 
>> stage, then mr. bowie will sign autographs)
>> B. song :david bowie - changes
>>
>> (A) ends up more relevant because of the frequency or number of words in 
>> it.. not cool...
>> I want it so the number of words matching will trump density/weight....
>>
>> Thanks im a newbie.
>> -Craig 


Re: score based on unique words matching???

Posted by Ahmet Arslan <io...@yahoo.com>.
> >> Heres my problem :
> >> 
> >> field1 (text) - subject
> >> q=david bowie changes
> >> 
> >> Problem : If a record mentions david bowie a lot,
> it beats out something more relevant (more unique matches)
> ...
> >> 
> >> A. (now appearing david bowie at the cineplex 7pm
> david bowie goes on stage, then mr. bowie will sign
> autographs)
> >> B. song :david bowie - changes
> >> 
> >> (A) ends up more relevant because of the frequency
> or number of words in it.. not cool...
> >> I want it so the number of words matching will
> trump density/weight....

You need to disable to Term Frequency (tf) factor. I am not sure just omitTf is available but omitTermFreqAndPositions exists. If you mark your field as omitTermFreqAndPositions="true" you will obtain what you want. But this with phrase queries won't work.