class This should be solr.SpatialRecursivePrefixTreeFieldType. For example, to find all documents within five kilometers of a given lat/lon point, you could enter: 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 (AKA the "great circle distance") from a given point. If you only want the query to score (with the above score local parameter), not filter, then set this local parameter to false. OverlapRatio: The relative overlap between the indexed shape & query shape.Īrea: haversine based area of the overlapping shapes expressed in terms of the distanceUnits configured for this fieldĪrea2D: cartesian coordinates based area of the overlapping shapes expressed in terms of the distanceUnits configured for this fieldįilter (Advanced option not supported by LatLonType (deprecated) or PointType). When used with BBoxField, additional options are supported: And with RPT, it’s only recommended for multi-valued point data, as the implementation doesn’t scale very well and for single-valued fields, you should instead use a separate non-RPT field purely for distance sorting. Here’s how LatLonPointSpatialField (LLPSF) should usually be configured in the schema:ĭon’t use this for indexed non-point shapes (e.g., polygons). Some esoteric details that are not in this guide can be found in the Spatial Search section of the Solr Wiki. It can’t do sorting/boosting.īBoxField is for indexing bounding boxes, querying by a box, specifying a search predicate (Intersects,Within,Contains,Disjoint,Equals), and a relevancy sort/boost like overlapRatio or simply the area. RptWithGeometrySpatialField is for indexing and searching non-point data though it can do points too. RPT offers some more features for more advanced/custom use cases and options like polygons and heatmaps. It replaces LatLonType which still exists for backwards compatibility. LatLonPointSpatialField is the ideal field type for the most common use-cases for lat-lon point data. SpatialRecursivePrefixTreeFieldType (RPT for short), including RptWithGeometrySpatialField, a derivative LatLonType (now deprecated) and its non-geodetic twin PointType
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |