distance
This block is part of the query group and was last modified in core v13.0.8.
Field Selection Required
This block relies on a field that you select to perform its data actions. You must manually select the field you want to use in your flow using the field selector modal. To access the modal, click the white button on the block.
Connection Type
This block connects from a query type block. Make sure to connect this block to the appropriate left-hand side connection.
Parent Requirements
This block requires specific parent elements: query_bool_filter, query_first_defined. Ensure this block is placed within the appropriate parent context.
distance v13.0.8 checks if the given fields is within the given distance.
- distance required
valueThe distance we should search within, e.g. 50km
- lat required
numberHidden when other fields are filled
- lon required
numberHidden when other fields are filled
- location required
v13.0.8geo_pointThe location (geo_point) to check • Hidden when other fields are filled
- query
query
Emits a geo_distance clause on the bound geo_point field, matching documents within the given distance of the center point. The center comes from the geo_point pin when wired, otherwise from the lat/lon pins; missing or falsy coordinates default to 0 and a missing or falsy distance defaults to "1km". Field name falls back to the deprecated field pin when no field is bound.
A typical wiring for distance: value feeds the field pin; value feeds the distance pin; number feeds the lat pin; number feeds the lon pin; from city feeds the geo_point pin; the query out pin feeds filter.
Commonly used with
In production blueprints, this block is most often wired together with:
- get fields: feeds into this block. Gets the selected fields from the given object.
- filter: this block feeds into it. Build a custom query using higher-level bool query.
- value: feeds into this block. Simply returns the provided value.
Version history
Introduced in v13.0.8.
v9.4.42, click here to see the release notes. Back to
query Return to the main group to view all sub-groups Back to query: geo Return to the group to view all blocks within this group 