Re: Modifying score based on tf and slop

2009-07-13 Thread Rads2029
Hi all, I modified the setFreqCurrentDoc method of SpanScorer as follows: ( Frequency is updated only for the shortest span ) int minMatchLenght=-1; do { int matchLength = spans.end() - spans.start(); if(minMatchLenght==-1)minMatchLenght=matchLength;

Re: Modifying score based on tf and slop

2009-07-06 Thread Radha Sreedharan
Thanks a lot Mark. Do Correct me if I am wrong. but what this means is tf does not really have the same meaning as it does in case of other queries. Also I think I understand better what hossman has told - in the sense that BC is there in two matching spans , which is why we get higher score - th

Re: Modifying score based on tf and slop

2009-07-06 Thread Mark Miller
tf() is used, just not with the term freq - the length of the matching Spans is used instead. The terms from nested Spans will still affect the score (you still get IDF), but term freq is substituted with matching Span length. Also, boosts of nested Spans are ignored - only the top level boos

Re: Modifying score based on tf and slop

2009-07-06 Thread Rads2029
Thanks , That helped clear quite a few things. A few questions though : 1) Regarding tf not making a difference : I do believe that override tf to return 1 makes a difference. When I did not override tf the score on doc(AB BC BC CD) was higher on doc ( AB BC CD) When I did not override tf the s

Re: Modifying score based on tf and slop

2009-07-05 Thread Chris Hostetter
(Disclaimer: i'm not currently looking at the code, this email is entirely a guess based on what i remember about SpanQueries) : II ) Using default implementation of tf in Similarity class: : : Case 1 - Doc : "AB BC BC CD" : Result : 4 - Actual score : % match : ( actual score / max possibl

Re: Modifying score based on tf and slop

2009-07-05 Thread Radha Sreedharan
Hi all, I really need the soln for this quite urgently. I have looked around quite a bit - I do know how to override the tf value in my custom similarity class. But since tf is tied up with the span, ie the SpanScorer ties the tf with the span, making tf return 1, leads to the other problem of slop

Re: Modifying score based on tf and slop

2009-06-30 Thread Rads2029
Restarting this thread. I did try out the soln mentioned by Simon below, however that did not work. As changing the tf implementation to return 1, adversely affected by span scoring . ie, the slop distance does not affect score if i make tf as 1. I had found a work around in some other way, but

Re: Modifying score based on tf and slop

2009-05-06 Thread Simon Willnauer
Hey, On Thu, May 7, 2009 at 3:51 AM, Radha Sreedharan wrote: > Hi, > > I made tf return a 1.0f but the issue with that is that now the slop > factor is neglected. > > So even if the tow terms in the span near query or far off or nearby > the score returned is the same. > > I want the no of times o

Re: Modifying score based on tf and slop

2009-05-06 Thread Radha Sreedharan
Hi, I made tf return a 1.0f but the issue with that is that now the slop factor is neglected. So even if the tow terms in the span near query or far off or nearby the score returned is the same. I want the no of times of the term occurring to be neglected but not the slop. Radha On Thu, May 7

Re: Modifying score based on tf and slop

2009-05-06 Thread Simon Willnauer
Hey, If I get you right you wanna make tf not affecting the score at all. if so why don't you just return 1.0f by overriding similarity? If you just wanna do that for the query you are using you could override Query#getSimilarity and return a delegate to the actual similarity. Hope that helps. si