Search query builder.
The search is carried out by the global index, as well as by the local indexes of the segments,
where the segment is some piece of the global map partition.
The procedure for selecting segments for the search is carried out in the following ways (in descending order of priority):If an area is explicitly specified as a polygon in the request (spatial_restriction), then it is taken into account first. Methods lower in priority are disabled, but are used to take into account distances in search relevance.When specifying a rectangular region of interest (bounding_rect), the search is carried out in some of its neighborhood.If no superior methods are specified priority parameters, then the user's position point is taken into account.
TODO: This condition does not work yet. It will be fixed in the next releases.When a well-known object (city, region or other toponym) is mentioned in the query text, the segment where the point of the found object from the global index falls into is added to the search. If none of the above is specified, then the global index is searched.