Need definition of log1p,log2p, ln1p, and ln2p of field_value_factor modifier

I have raised https://github.com/elastic/elasticsearch/issues/13511 to update the documentation but in the mean time, from looking at the code in FieldValueFactorFunction.Modifier:

for a value n:

  1. log1p = Math.log10(n + 1)
  2. log2p = Math.log10(n + 2)
  3. ln1p = Math.log1p(n) = Math.log(n + 1) [= ln(n + 1)]
  4. ln2p = Math.log2p(n + 1) = Math.log(n + 2) [= ln(n + 2)]

Hope that helps

1 Like