Package org.apache.solr.response
Class GeoJSONResponseWriter
- java.lang.Object
-
- org.apache.solr.response.JSONResponseWriter
-
- org.apache.solr.response.GeoJSONResponseWriter
-
- All Implemented Interfaces:
QueryResponseWriter,NamedListInitializedPlugin
public class GeoJSONResponseWriter extends JSONResponseWriter
Extend the standard JSONResponseWriter to support GeoJSON. This writes aSolrDocumentListwith a 'FeatureCollection', following the specification in geojson.org
-
-
Field Summary
Fields Modifier and Type Field Description static StringFIELD-
Fields inherited from class org.apache.solr.response.JSONResponseWriter
CONTENT_TYPE_JSON_UTF8
-
Fields inherited from interface org.apache.solr.response.QueryResponseWriter
CONTENT_TYPE_TEXT_ASCII, CONTENT_TYPE_TEXT_UTF8, CONTENT_TYPE_XML_UTF8
-
-
Constructor Summary
Constructors Constructor Description GeoJSONResponseWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwrite(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp)Write a SolrQueryResponse, this method must be thread save.-
Methods inherited from class org.apache.solr.response.JSONResponseWriter
getContentType, getPushWriter, init
-
-
-
-
Field Detail
-
FIELD
public static final String FIELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
write
public void write(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp) throws IOException
Description copied from interface:QueryResponseWriterWrite a SolrQueryResponse, this method must be thread save.Information about the request (in particular: formatting options) may be obtained from
reqbut the dominant source of information should bersp.There are no mandatory actions that write must perform. An empty write implementation would fulfill all interface obligations.
- Specified by:
writein interfaceQueryResponseWriter- Overrides:
writein classJSONResponseWriter- Throws:
IOException
-
-