Class JsonPathResponseParser

java.lang.Object
org.apache.solr.client.solrj.ResponseParser
com.lucidworks.cloud.api.solr.parser.JsonPathResponseParser

public class JsonPathResponseParser extends org.apache.solr.client.solrj.ResponseParser
Extracts from response only requested paths and add them to returned map in a flat manner.
  • Constructor Details

    • JsonPathResponseParser

      public JsonPathResponseParser(String... paths)
      Parameters:
      paths - - a set o paths which should be extracted from response. Each path is a single string with elements joined by '/'. If path is found in the response its value will be added under the key equals to requested path.
  • Method Details

    • getWriterType

      public String getWriterType()
      Specified by:
      getWriterType in class org.apache.solr.client.solrj.ResponseParser
    • processResponse

      public org.apache.solr.common.util.NamedList<Object> processResponse(InputStream body, String encoding)
      Specified by:
      processResponse in class org.apache.solr.client.solrj.ResponseParser
    • processResponse

      public org.apache.solr.common.util.NamedList<Object> processResponse(Reader reader)
      Specified by:
      processResponse in class org.apache.solr.client.solrj.ResponseParser
    • getContentType

      public String getContentType()
      Overrides:
      getContentType in class org.apache.solr.client.solrj.ResponseParser
    • getVersion

      public String getVersion()
      Overrides:
      getVersion in class org.apache.solr.client.solrj.ResponseParser