Skip 3 rounds of RFI questions
Get the pre-RFI brief first
Virtocommerce
Home Virto Commerce blog Geo-Point Datatype: Distance-Based Product Search in Virto Commerce

Geo-Point Datatype: Distance-Based Product Search in Virto Commerce

Sep 8, 2026 • 7 min

A geo-point is a single latitude and longitude pair pinned to a product, a branch, or any other indexed record. Once it is indexed as a spatial type rather than as text, the search engine can answer two questions that keyword search cannot: what is within this radius, and what is nearest.

Virto Commerce has carried GeoPoint as a first-class catalog property type since 2018. This article covers what it does, where it earns its place in B2B, how the query actually reaches Elasticsearch, and what it deliberately leaves to other tools.

The Short Version

  • A geo-point stores one latitude and longitude pair, validated to ±90 and ±180.
  • It powers three query primitives: filter by radius, sort by distance, and bucket results into distance bands.
  • In B2B it answers the questions buyers actually ask: which branch has it, how far away, can I collect it today.
  • It is a search primitive, not a store locator. You still build the map and the pickup flow on top.
  • Distances are straight-line, not drive time. Coordinates have to be kept current, usually from the ERP.

What Is a Geo-Point Datatype?

A geo-point is the smallest possible unit of location data: one point on the surface of the Earth, expressed as a latitude and a longitude. Virto Commerce stores it as a value object that validates both halves on write: latitude between -90 and 90, longitude between -180 and 180. A malformed coordinate fails at the boundary instead of silently indexing as garbage.

The distinction that matters is typing. You can already put 52.3676, 4.9041 into a short-text property today, and the search engine will happily index it — as a string. Strings sort alphabetically and match exactly. They cannot tell you that Amsterdam is closer to Utrecht than to Milan. A geo-point field is indexed as a spatial type, so the engine understands the two numbers as a position and can do geometry with them.

GeoPoint sits in the catalog module’s list of property value types next to ShortText, LongText, Number, Integer, DateTime, Boolean, Html, Measure, and Color. It is configured the same way as any other property, which means merchandisers assign it from the admin UI without a developer in the loop.

Short text versus geo-point: the same coordinates indexed two ways

Pic. Why the field type matters.

What the Geo-Point Datatype Enables

Indexing a coordinate is only useful if you can query it. The search service exposes three capabilities on top of a geo-point field, and they compose with everything else in the query — keywords, facets, price ranges, catalog scope.

All three run inside the same request as the rest of the search. There is no second round trip to a mapping service and no post-filtering of results in application code, which is what keeps the latency budget intact on a catalog of any size.

Where Distance-Based Search Pays Off in B2B

Geolocation reads as a B2C feature — find the nearest coffee shop. In B2B it is usually about inventory and logistics, and the stakes are higher because the buyer is trying to keep a job site or a production line moving.

The common thread: in each case the buyer is not browsing. They know what they need and the only open question is where they can get it and how fast. Distance is the ranking signal that answers it. This is also why geo-point pairs naturally with click and collect, where the whole flow depends on surfacing the right pickup location first.

Distance is one signal. See what else the search service ranks on.

How It Works Under the Hood

The path from a coordinate in the admin UI to a sorted result set has four steps.

  1. A catalog property is defined with the GeoPoint value type and given a value in latitude, longitude form.
  2. During indexing, the value is emitted as a field of type GeoPoint in the search document, which is a first-class member of the search module’s field-type enumeration rather than a special case.
  3. The Elasticsearch provider maps that field to the native geo_point type, so the coordinate is stored in a structure built for spatial lookups.
  4. At query time, a GeoDistanceFilter becomes an Elasticsearch geo_distance query, and a GeoDistanceSortingField becomes a _geo_distance sort. The provider currently expresses the radius in kilometres.

The abstraction is worth noting. Your application code talks to the search module’s filter and sorting model, not to Elasticsearch. Swapping the search provider does not rewrite your geo queries, which is the same separation the rest of the B2B ecommerce platform follows.

How a coordinate becomes a distance query, from catalog property to Elasticsearch

Pic. How a coordinate becomes a distance query.

What Geo-Point Does Not Do

Scoping this correctly saves an awkward conversation later. Geo-point search is a primitive, and there are four things it does not give you.

  • Drive time and routing. Distance is measured as a straight line across the globe. For “within 50 km” that is the right model and it is fast. For “90 minutes by van in Tuesday traffic” you need a routing API, called after search has narrowed the candidates from thousands to a handful.
  • A store locator UI. The engine returns ordered results. The map, the pins, the branch cards, and the browser location prompt are all frontend work.
  • Provider independence. Radius filtering and distance sorting need a search engine with a spatial field type. On the Elasticsearch provider this works out of the box; a provider without spatial support will index the value but cannot answer distance queries against it.
  • Fresh coordinates. A geo-point is only as good as the data behind it. Branch relocations and new depots have to flow through, which in practice means treating coordinates as part of the ERP integration rather than as a field someone remembers to update.

Designing search for a branch network?

The Architectural Guide sets out how catalog, search, and inventory fit together in a composable B2B build.
Download the Architectural Guide

How to Add a Geo-Point Property

For a catalog that already runs on Virto Commerce, adding the capability is a configuration task rather than a development project.

  1. In the admin, open the catalog or category where the property should live and add a new property with the GeoPoint value type.
  2. Populate it. For a handful of branches, type the coordinates in. For anything larger, map the field in your ERP or PIM sync so it arrives with the rest of the record.
  3. Reindex so the new field reaches the search engine with the correct mapping. A partial index over the affected catalog is enough.
  4. Add the geo filter and sort to the search request your storefront issues, passing the buyer’s location as the origin point.
  5. Handle the case where you have no origin. Browser geolocation gets declined, and a default such as the buyer’s account address or their assigned branch keeps the page useful instead of empty.

If you are running across several markets, read this alongside how multiregional commerce handles catalogs, pricing, and fulfilment per region. Distance-based search is one input into that model, not a substitute for it.

Conclusion

Geo-point is a small feature with a specific job. It turns a coordinate from a string that happens to contain numbers into something the search engine can reason about, and it does so behind an abstraction that keeps your code away from provider-specific query syntax.

For B2B sellers with branches, depots, dealers, or field stock, that is the difference between a catalog that tells the buyer a part exists and one that tells them where to pick it up this afternoon. The second answer is the one that closes the order.

You might also like...