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

Ryan McKinley commented on SOLR-8814:
-------------------------------------

bq. In the test, it appears System.setProperty("enable.update.log", "false"); 
// schema12 doesn't support version is not needed since you don't use schema12

fixed -- thanks

bq. I suggest initializing the HashMap of the built-in transformers with the 
no-arg constructor (TransformerFactory.java), and same thing for the response 
writers (SolrCore.java). It's not worth it in trying in trying to optimize & 
maintain anything else. I realize you didn't introduce these but I suggest 
ending it now.

Lets open another issue if you care about this... i don't know enough to say, 
and don't want that discussion to get lost in this issue

bq. Personally I'd find it far easier to interpret the test if I was looking at 
the JSON string or toString'ed Map or whatever it is, versus the laborious 
extraction of each part of the data structure. If you disagree, leave it.

I think the tests have a good mix of this -- some are testing with strings and 
others are checking the direct element.  (Where parsing is important)

bq. GeoTransformerFactory.java doesn't compile for me; it references 
GeoJSONResponseWriter.FIELD which doesn't exist. The patch file itself seemed 
strange; seemed like a list of commits and not one patch. Maybe this is related.

sorry, my git patch was weird.  It was the 'patch' flavor, not the 'diff' flavor


> Support 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, 
> SOLR-8814-add-GeoJSONResponseWriter.patch, 
> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to