`log10`

Generic Description

Computes a base-10 logarithm for positive numeric values. It is documented separately because numeric transforms change ranking, thresholds, and buckets in ways planner tools must not guess.

Simple example:

RETURN log10(1000.0) AS value

Consumer-Level Explanation

Use it when the business scale is decimal, such as order-of-magnitude bands. Prefer this function when the transformation is a deliberate part of the model or report, and name the derived value in a WITH stage when it will be reused.

More Detailed Explanation

log10 is scalar math, so it is evaluated per row after graph patterns, procedure output, or map projections have produced values. Keep it close to the query when thresholds, ranking, and derived fields need to be auditable and reproducible.

Advanced Example

This example applies log10 to a named score component after matching graph data, making the derived metric reviewable before ordering.

MATCH (d:Document)
WITH d, properties(d).prize + 1.0 AS adjusted_priority
RETURN d.title AS document,
       log10(adjusted_priority) AS decimal_scale_priority
ORDER BY decimal_scale_priority DESC

Real Use Cases

Real Limitations And Tradeoffs