You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2016/03/09 22:41:40 UTC

[jira] [Commented] (SOLR-8814) Suppor GeoJSON response format

    [ https://issues.apache.org/jira/browse/SOLR-8814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15188092#comment-15188092 ] 

David Smiley commented on SOLR-8814:
------------------------------------

I left some feedback: https://github.com/ryantxu/lucene-solr/commit/4792f0c13cb4d99cddf92c406a127ce08e04c715#diff-6ead4e8deaf560600de90a67c0b37e57R2126

> Suppor GeoJSON response format
> ------------------------------
>
>                 Key: SOLR-8814
>                 URL: https://issues.apache.org/jira/browse/SOLR-8814
>             Project: Solr
>          Issue Type: New Feature
>          Components: Response Writers
>            Reporter: Ryan McKinley
>            Priority: Minor
>             Fix For: master, 6.1
>
>         Attachments: SOLR-8814-add-GeoJSONResponseWriter.patch
>
>
> With minor changes, we can modify the existing JSON writer to produce a GeoJSON `FeatureCollection` for ever SolrDocumentList.  We can then pick a field to use as the geometry type, and use that for the Feature#geometry
> {code}
> "response":{"type":"FeatureCollection","numFound":1,"start":0,"features":[
>       {"type":"Feature",
>         "geometry":{"type":"Point","coordinates":[1,2]},
>         "properties":{
>           ... the normal solr doc fields here ...}}]
>   }}
> {code}
> This will allow adding solr results directly to various mapping clients like [Leaflet|http://leafletjs.com/]
> ----
> This patch will work with Documents that have a spatial field the either:
> 1. Extends AbstractSpatialFieldType
> 2. has a stored value with geojson
> 2. has a stored value that can be parsed by spatial4j (WKT, etc)
> The spatial field is identified with the parameter `geojson.field`



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org