This query finds all geo_point indexed matches within a given area (identified by the list of geo_point coordinates).
More...
#include <couchbase/geo_bounding_box_query.hxx>
|
| geo_bounding_box_query (geo_point top_left, geo_point bottom_right) |
| Create a new geo bounding box query.
|
|
| geo_bounding_box_query (double top_left_latitude, double top_left_longitude, double bottom_right_latitude, double bottom_right_longitude) |
| Create a new geo distance query.
|
|
auto | field (std::string field_name) -> geo_bounding_box_query & |
| If a field is specified, only terms in that field will be matched.
|
|
auto | encode () const -> encoded_search_query override |
|
virtual | ~search_query ()=default |
|
template<typename derived_query = search_query, std::enable_if_t< std::is_base_of_v< search_query, derived_query >, bool > = true> |
auto | boost (double boost) -> derived_query & |
| The boost parameter is used to increase the relative weight of a clause (with a boost greater than 1) or decrease the relative weight (with a boost between 0 and 1).
|
|
This query finds all geo_point indexed matches within a given area (identified by the list of geo_point coordinates).
Each of the pairs is taken to indicate one corner of a polygon. Documents are returned if they reference a location within the area of the polygon.
The following query-body uses an array of geo_point to specify the latitude and longitude of each of the corners of a polygon, known as polygon points. Here, the last-specified entry is identical to the initial, thus explicitly closing the box. However, specifying an explicit closure in this way is optional: the closure will be inferred by the Couchbase Server if not explicitly specified.
- See also
- https://docs.couchbase.com/server/current/fts/fts-supported-queries-geo-bounded-rectangle.html server documentation
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ geo_bounding_box_query() [1/2]
Create a new geo bounding box query.
- Parameters
-
top_left | the top left coordinates signify the bounding box area |
bottom_right | the bottom right coordinates signify the bounding box area |
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ geo_bounding_box_query() [2/2]
geo_bounding_box_query |
( |
double | top_left_latitude, |
|
|
double | top_left_longitude, |
|
|
double | bottom_right_latitude, |
|
|
double | bottom_right_longitude ) |
|
inline |
Create a new geo distance query.
- Parameters
-
top_left_latitude | latitude of the top left coordinate |
top_left_longitude | longitude of the top left coordinate |
bottom_right_latitude | latitude of the bottom right coordinate |
bottom_right_longitude | latitude of the bottom right coordinate |
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ encode()
auto encode |
( |
| ) |
const -> encoded_search_query |
|
nodiscardoverridevirtual |
- Returns
- encoded representation of the query.
- Since
- 1.0.0
- Internal
- Internal interface
Implements search_query.
◆ field()
If a field is specified, only terms in that field will be matched.
- Parameters
-
field_name | name of the field to be matched |
- Returns
- this query for chaining purposes.
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
The documentation for this class was generated from the following file: