lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <>
Subject [jira] [Commented] (SOLR-13263) Facet Heat Map should support GeoJSON
Date Fri, 10 May 2019 03:44:00 GMT


David Smiley commented on SOLR-13263:

bq. Even after changing the max Latitude value to 70, the parsed shape's bounding box is still

Yeah I noticed that to and can't explain it.  So I think it's likely there's a bug in Geo3D...
but not a serious bug since getBounds is allowed to return an approximation that contains
the true bounds... granted the world is quite an approximation :-)  Usually the ramification
would be sub-optimal performance as this bounds is used as a fast-path short-circuit.

Any way... lets back away from using Geo3D here.  It complicates your test because now you
need another field type as well.  Can you simply add one test method that does the heatmap
on a lineString?  I know it probably has no practical application and seems silly but the
point here is only to test GeoJSON can be parsed and the heatmap gives results on it that
roughly appear appropriate.  That's it.

If you are in the mood to increase the scope some, you might look at merging the logic of
 {{org.apache.solr.schema.AbstractSpatialFieldType#parseShape}} into {{SpatialUtils.parseGeomSolrException}}
such that the parseShape can simply call parseGeomSolrException, and would likely accept an
optional ShapeReader argument.  Thus one method that looks for a plain point "lat,lon", or
rectangle range syntax "[lat,lon TO lat2,lon2]" or finally what Spatial4j supports (WKT &
GeoJson).  That would have greater impact than this issue -- it'd mean the rectangle-range
syntax would then work at indexing time for the spatial field types that use that.  On second
thought; that'd deserve its own issue.

I think just keep things

> Facet Heat Map should support GeoJSON
> -------------------------------------
>                 Key: SOLR-13263
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Facet Module, faceting
>    Affects Versions: 8.0, 8.1, master (9.0)
>            Reporter: Bar Rotstein
>            Priority: Major
>              Labels: Facets, Geolocation, facet, faceting, geo
>         Attachments: SOLR-13263-nocommit-geo3d-failure.patch, SOLR-13263-nocommit.patch
> Currently Facet Heatmap(Geographical facets) do not support any other subjects other
than WKT or '[ ]'. This seems to be caused since FacetHeatmap.Parser#parse uses SpatialUtils#parseGeomSolrException,
which in turn uses a deprecated JTS method (SpatialContext#readShapeFromWkt) to parse the
string input.
> The newer method of parsing a String to a Shape object should be used, makes the code
a lot cleaner and should support more formats (including GeoJSON).

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message