facet counts by places
This block is part of the places group and was last modified in core v15.0.0.
facet counts by places v15.0.0 Counts how many items in a list are near each category : “412 objects near a hospital” in one node. Counts items, not places: an item with three hospitals nearby counts once, which is what a facet over an inventory means. Pass categories with a shared radius, or filters for a named filter per facet.
- items
arrayrequiredv15.0.0The list to process. Either an array of geo points, or an array of objects with
point pathnaming where the coordinate sits. - point path
valuev15.0.0Dotted path to the geo point inside each item, e.g.
general.location. Leave empty when the items are geo points themselves. - categories
arrayv15.0.0Category groups to count, each using
radius. Either this orfiltersis required. - radius (m)
numberv15.0.0Radius applied to every category. Empty uses 500.
- filters
objectv15.0.0Named filters, as
{facet name: filter}, for facets that need different radii or negation. Combined withcategoriesif both are given.
- counts
objectv15.0.0Item count per category group or named filter.
- total
numberv15.0.0Items that had a usable coordinate and were evaluated. Compare against the input length to spot missing coordinates.
- success
conditionv15.0.0True when the query ran. An empty result is still a success.
- error
valuev15.0.0Error code when the query could not run:
PLACES_NOT_AVAILABLE,CATEGORIES_REQUIRED.
A typical wiring for facet counts by places: with values feeds the items pin; the counts out pin feeds custom field.
Used in these guides
These documentation pages use or explain this block:
Version history
Introduced in v15.0.0.
Back to
places Return to the main group to view all sub-groups Back to Places Return to the group to view all blocks within this group 