Example usage for org.apache.solr.util RestTestHarness query

List of usage examples for org.apache.solr.util RestTestHarness query

Introduction

In this page you can find the example usage for org.apache.solr.util RestTestHarness query.

Prototype

public String query(String request) throws Exception 

Source Link

Document

Processes a "query" using a URL path (with no context path) + optional query params, e.g.

Usage

From source file:org.typo3.solr.search.AccessFilterQParserPluginTest.java

License:Apache License

public static Map getResponseMap(String path, RestTestHarness restHarness) throws Exception {
    String response = restHarness.query(path);
    try {//  w  w w  . j a v a 2  s.co  m
        return (Map) ObjectBuilder.getVal(new JSONParser(new StringReader(response)));
    } catch (JSONParser.ParseException e) {
        log.error(response);
        return Collections.emptyMap();
    }
}