Distance_feature

Distance feature

/ Distance_feature, / Proximity

Distance feature query #

Recalls every document and scores each by its proximity to an origin — the closer, the higher:

score = boost × pivot / (pivot + distance(document, origin))

A document exactly at the origin scores boost; one pivot units away scores boost / 2. The decay is gradual — unlike a range filter, a document three pivots out still scores boost / 4, so nothing is excluded, only demoted. It answers “rank by recency or by distance” without a second index or a script.

...