Package org.apache.solr.response
Class GeoJSONResponseWriter
java.lang.Object
org.apache.solr.response.JSONResponseWriter
org.apache.solr.response.GeoJSONResponseWriter
- All Implemented Interfaces:
QueryResponseWriter,TextQueryResponseWriter,NamedListInitializedPlugin
Extend the standard JSONResponseWriter to support GeoJSON. This writes a
SolrDocumentList
with a 'FeatureCollection', following the specification in geojson.org-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.solr.response.TextQueryResponseWriter
TextQueryResponseWriter.NonFlushingStream -
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_UTF8, CONTENT_TYPE_XML_UTF8 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp) Write a SolrQueryResponse in a textual manner.Methods inherited from class org.apache.solr.response.JSONResponseWriter
getContentType, getPushWriter, initMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.solr.response.QueryResponseWriter
writeMethods inherited from interface org.apache.solr.response.TextQueryResponseWriter
write, writeToString
-
Field Details
-
FIELD
- See Also:
-
-
Constructor Details
-
GeoJSONResponseWriter
public GeoJSONResponseWriter()
-
-
Method Details
-
write
Description copied from interface:TextQueryResponseWriterWrite a SolrQueryResponse in a textual manner.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 interfaceTextQueryResponseWriter- Overrides:
writein classJSONResponseWriter- Throws:
IOException
-