For example, to find all documents within five kilometers of a given lat/lon point, you could enter &q=*:*&fq=&sfield=store&pt=45.15,-93. Another way of looking at it is that it creates a circular shape filter. The geofilt filter allows you to retrieve results based on the geospatial distance (the “great circle distance”) from a given point. (Advanced option RPT and BBoxField field types only) If you only want the query to score (with the above score local-param), not filter, then set this local-param to false. area2D – cartesian coordinates based area of the overlapping shapes expressed in terms of the distanceUnits configured for this field.area – haversine based area of the overlapping shapes expressed in terms of the distanceUnits configured for this field.overlapRatio – The relative overlap between the indexed shape & query shape.When used with BBoxField,additional options are supported: distance – distance between the field value and the specified center point in the distanceUnits configured for this field.
degrees – distance in degrees between the field value and the specified center point.miles – distance in miles between the field value and the specified center point.kilometers – distance in kilometers between the field value and the specified center point.as the main query in q), this local-param determines what scores will be produced. (Advanced option RPT and BBoxField field types only) If the query is used in a scoring context (e.g. Cand F denote the aggregated consumption and production respectively, while NXrefer to the net export. Otherwise, “x,y” for PointType or “x y” for RPT field types. 2 Model Assume there are two countries A and B (subscript i), each with two sectors 1 and 2 (superscript j), and conduct cost-free trade without tariff.Sector 1 refers to creative good, while sector 2 refers to other goods. The center point using the format “lat,lon” if latitude & longitude. (RPT & BBoxField can set other units via the setting distanceUnits) The radial distance, usually in kilometers. Searching documents based on their location:īoth filters support following parameters:
For non-geodetic points, the order is x,y for PointType, and for RPT you must use a space instead of a comma, or use WKT( Well-known text ( WKT) is a text markup language for representing vector geometry objects Ex: POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)). They can both be used simultaneously for what each does best – LatLonType for sorting/boosting, RPT for filtering.įor indexing geodetic points (latitude and longitude), supply the pair of numbers as a string with a comma separating them in latitude then longitude order.
RPT offers more features than LatLonType and fast filter performance, although LatLonType is more appropriate when efficient distance sorting/boosting is desired. SpatialRecursivePrefixTreeFieldType (RPT for short) – Fast filter performance.LatLonType – Better for distance sorting/boosting.Sort or boost scoring by distance between points, or relative area between rectanglesįollowing field types are available for spatial search:.GeoDist provides several geographical variables, in particular bilateral distances measured using citylevel data to assess the geographic distribution of population inside each nation. Filter search results by a bounding box or circle or by other shapes GeoDist makes available the exhaustive set of gravity variables used in Mayer and Zignago (2005).Solr supports location data for use in spatial/geospatial searches. We try to improve upon the existing similar datasets in terms of geographical coverage, quality of measurement and number of variables provided.In this article we will see how solr supports spatial search. GeoDist makes available the exhaustive set of gravity variables used in Mayer and Zignago (2005). The GeoDist webpage provides two distinct files: a country-specific one (geo_cepii)and a dyadic one (dist_cepii) including a set of different distance and common dummy variables used in gravity equations to identify particular links between countries such as colonial past, common languages, contiguity. For most of them, different calculations of “intra-national distances” are also available. We have calculated different measures of bilateral distances available for most countries across the world (225 countries in the current version of the database). GeoDist makes available the exhaustive set of gravity variables used in Mayer and Zignago (2005). "Notes on CEPII’s distances measures: The GeoDist database,"
CEPII - Notes on CEPII’s distances measures: The GeoDist database