<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 13, 2014 at 6:59 PM, Ivan Čukić <span dir="ltr"><<a href="mailto:ivan.cukic@kde.org" target="_blank">ivan.cukic@kde.org</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
3. What will be needed<br>
================<br>
<br>
Integration with baloo. It will require patches on both sides if we are to<br>
support all the use-cases without cross-queries. We will need accessible file<br>
types via sqlite (on baloo side) and baloo identifiers or something on kamd<br>
side.<br></blockquote><div><br></div><div>* The Baloo identifiers will only work for indexed files. Given that we're not enforcing users to index everything (nor should we). We need a different approach.</div><div>* This would also require Baloo to stick with sqlite.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Appendix 1: Formula for the resource scoring:<br>
===============================<br>
<br>
LaTeX formatted:<br>
S = \sum _{i = 1} ^ n<br>
e^{-d_i} e^{k_i \log(l_i)}<br>
<br>
Haskell-like formatted, whichever you find easier to read :)<br>
sum [<br>
exp (-di) * exp ( ki * log li ) | i <- [1..n]<br>
]<br>
<br>
where d_i is the time that passed since the i-th event, k_i coefficient<br>
depending on the type of the event, l_i length of the event (time distance<br>
between open and close for example, or focus in and out)<br>
<br>
It can be rewritten to look prettier (exp log = id and so on), but this<br>
conveys the meaning in a nicer way by separating the terms according to their<br>
meaning.<br>
<br>
The main ideas behind the formula are:<br>
- score degrades with the time, so if a document was kept open in okular for<br>
an hour yesterday, it will have a significantly higher score than a document<br>
that was kept open for a whole day a year ago;<br>
- different events have different meanings;<br>
- event time interval is measured on a logarithmic scale, so that there is a<br>
greater difference between 1hr and 2hrs, than between 11hrs and 12hrs;<br>
- can be calculated quickly by only processing new events since the last<br>
score update.<br></blockquote><div><br></div><div>I don't understand all of the math, but this sounds quite ideal. Currently in KRunner we have a global run count which affects the score of all the result, and that score doesn't degrade over time. This seems like something nice to replace it with, if we can make it super fast that is. </div><div><br></div><div>-- <br></div></div><span style="color:rgb(192,192,192)">Vishesh Handa</span><br>
</div></div>