LogMergePolicy

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

LogMergePolicy

Koji Sekiguchi
Hello,

I'm curious, why is LogMergePolicy named *Log*MergePolicy?
(Why not ExpMergePolicy? :-)

Thank you,

Koji


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: LogMergePolicy

steven_parkes
        I'm curious, why is LogMergePolicy named *Log*MergePolicy?
        (Why not ExpMergePolicy? :-)

Well, I guess it's a matter of perspective. When you look at the way the
algorithm works, the merge decisions are based on a concept of level and
levels are assigned based on the log of the number of documents in a
segment (going back to Ning's equation). When one is in the code, it's
very natural to think/talk about "log-base-merge-factor".

This does result in the number of documents in segments being
order-of-magnitude/exponentially related so that might have made more
sense to users, so perhaps it wasn't the best decision ...

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: LogMergePolicy

Yonik Seeley-2
On Jan 24, 2008 8:40 AM, Steven Parkes <[hidden email]> wrote:

>         I'm curious, why is LogMergePolicy named *Log*MergePolicy?
>         (Why not ExpMergePolicy? :-)
>
> Well, I guess it's a matter of perspective. When you look at the way the
> algorithm works, the merge decisions are based on a concept of level and
> levels are assigned based on the log of the number of documents in a
> segment (going back to Ning's equation). When one is in the code, it's
> very natural to think/talk about "log-base-merge-factor".
>
> This does result in the number of documents in segments being
> order-of-magnitude/exponentially related so that might have made more
> sense to users, so perhaps it wasn't the best decision ...

I could be accurately described either way, but there is precedent for
"log" too... log-normal, for example is normal after one takes the log
(it could have been called exponential-normal).  I also tend to think
of our number system as logarithmic in nature rather than exponential.

-Yonik

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: LogMergePolicy

Koji Sekiguchi
In reply to this post by steven_parkes
Thank you Steven and Yonik,

I think I got it. And I can find LogMergePolicy uses
Math.log() to find merges. :-)

Thank you again,

Koji


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]