** <<terms-join>>. The search context is applied to both the terms join and the vector source when the vector source is provided by Elasticsearch documents.
You can create two types of filters by interacting with your map:
* <<maps-spatial-filters, Spatial filters>>
* <<maps-phrase-filter, Phrase filters>>
[float]
[[maps-spatial-filters]]
==== Spatial filters
A spatial filter narrow searchs results to documents that either intersect with, are within, or do not intersect with the specified geometry.
You can create spatial filters in two ways:
* Click the tool icon image:maps/images/tools_icon.png[], and then draw a polygon or bounding box on the map to define the spatial filter.
* Click *Filter by geometry* in a tooltip, and then use the feature's geometry for the spatial filter.
+
[role="screenshot"]
image::maps/images/create_spatial_filter.png[]
Spatial filters have the following properties:
* *Geometry label* enables you to provide a meaningful name for your spatial filter.
* *Spatial field* specifies the geo_point or geo_shape field used to determine if a document matches the spatial relation with the specified geometry.
* *Spatial relation* determines the {ref}/query-dsl-geo-shape-query.html#_spatial_relations[spatial relation operator] to use at search time. Only available when *Spatial field* is set to geo_shape.
[float]
[[maps-phrase-filter]]
==== Phrase filters
A phrase filter narrows search results to documents that contain the specified text.
You can create a phrase filter by clicking the plus icon image:maps/images/gs_plus_icon.png[] in a feature tooltip.
NOTE: Layer filters are not applied to *term joins*. You can apply a search request to *term joins* by setting the *where* clause in the join definition.