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
Extend the standard JSONResponseWriter to support GeoJSON. This writes a
SolrDocumentList
with a 'FeatureCollection', following the specification in geojson.org-
Field Summary
FieldsFields inherited from class org.apache.solr.response.JSONResponseWriter
CONTENT_TYPE_JSON_UTF8Fields inherited from interface org.apache.solr.response.QueryResponseWriter
CONTENT_TYPE_TEXT_ASCII, CONTENT_TYPE_TEXT_UTF8, CONTENT_TYPE_XML_UTF8 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(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 Details
-
FIELD
- See Also:
-
-
Constructor Details
-
GeoJSONResponseWriter
public GeoJSONResponseWriter()
-
-
Method Details
-
write
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
-