You can create facets based on geographic points (both GPS and XY types). Like other
facets, they automatically display a count of matching documents for each facet
value.
You can also aggregate document values that fall within one or several geographic areas.
You can define the following types of geographic facets:
To return matches within a specified disk or polygon, create a
Geographic facet. Use this facet when you know where to focus
your search. You can define multiple disks or polygons for a facet. Each disk or polygon
represents a facet value.
To highlight areas containing matches within a bounding box, create an
Auto-tile geographic facet. Use this facet when you want to
locate areas containing matches (known as tiles) within a larger area.
By default, this bounding box (or the extent) is the entire globe, but you can modify
this. Each tile represents a facet value.
In the Administration Console, go to Search > Search Logics > Facets.
Click Add facet, specify a name, and select the
Geographic type.
In Index field, select a geographic field from the list.
In Domains, for Type select the shape
of the area, that is to say Disk or
Polygon and specify the area’s extent.
The coordinates depend on whether the facet is based on a GPS or XY point index
field:
For a disk: specify a center point and a radius.
For a polygon: specify a list of coordinates, separated by semicolumns. Two
successive points must be connected by an edge, and the polygon is automatically
closed (an edge is added between the last and first point).
Important:
The time required for facet synthesis is directly
proportional to the number of points in the polygon.
(Optional) Add another disk or polygon area. You can mix polygons and disks within
the same facet, and the areas can overlap.
(Optional) Expand Aggregation to create a summary on an index field for this
facet.
Click Apply.
For an example (created in the XML configuration file, rather than in the Administration Console), see below.
Example
This example uses an ExplicitGeoFacet with one DiskDomain (blue) and two PolygonDomains
(red and green), as shown in the figure below.
In this example, dark red crosses represent indexed points for each document. The red and
blue domains overlap, which is allowed, and the point that falls within the intersection
counts once for each domain.
Five points fall into the red polygon domain, three into the disk, and one into the green
polygon domain. Three points fall outside all domains, and so are not counted in the
results.
Create Facets Based on a Bounding Box
In the Administration Console, go to Search > Search Logics > Facets,
Click Add facet, specify a name, and select an
Auto-tilegeographic type.
In Index field,select a geographic
field from the list.
By default, the bounding box is the entire globe. If you want to change this, the
coordinates depend on whether the facet is based on a GPS or XY point index field:
Bounding box min: define the lower left limit.
Bounding box max: define the upper right limit.
Tile size: specify the size of the area to highlight when
there is a matching point on the map.
(Optional) Expand Aggregation to create a summary on an index field for this
facet.
Click Apply.
Display Geographic Facets in a Map Widget
In Mashup Builder, drag a Google Maps widget onto your page.
Select a feed for your widget.
In the widget properties, go to the Based on Geo Facets
tab.
In Geo facets list, click inside the field, then select
your geographic facets from the panel on the left.
In Aggregation, click inside the field, then expand
Aggregation from the panel on the left. From the list,
select an aggregation. The higher this value, the darker the tile appears on the
map.