odelmarcelle commented on issue #13152: URL: https://github.com/apache/lucene/issues/13152#issuecomment-2018475392
That's my personal opinion, but given that it's up to the user to allow sloppy matches, I question why the score penalty even exists. If a user wants to rank higher exact matches, it's easy to do so by boosting a more restrictive query. Now, if the penalty is there to stay, I would argue that an exponential decay function would be more suitable for the penalty weight. The penalty would decrease with a fixed factor, unlike the current implementation which is penalize very harshly small slops but not so much bigger ones. This could be implemented, for example, having this kind of weight: `Math.pow(k, matchLength)` with `k` fixed to, say, `0.95` for a parameter-free implementation. See a comparison of penalty weights for the current implementation and the exponential decay: `1f / (1f + matchLength)` `1.0, 0.5, 0.333, 0.25, 0.2, 0.167, 0.143, 0.125, 0.111, 0.1` `Math.pow(0.95, matchLength)` `1.0, 0.95, 0.902, 0.857, 0.815, 0.774, 0.735, 0.698, 0.663, 0.63` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
