Class SolrTestCaseHS

java.lang.Object
org.junit.Assert
org.apache.lucene.tests.util.LuceneTestCase

@SuppressSSL public class SolrTestCaseHS extends SolrTestCaseJ4
  • Constructor Details

    • SolrTestCaseHS

      public SolrTestCaseHS()
  • Method Details

    • rand

      public static <T> T rand(T... vals)
    • params

      public static org.apache.solr.common.params.ModifiableSolrParams params(org.apache.solr.common.params.SolrParams params, String... moreParams)
    • toObject

      public static Map<String,Object> toObject(SolrTestCaseJ4.Doc doc, org.apache.solr.schema.IndexSchema schema, Collection<String> fieldNames)
    • assertJQ

      public static void assertJQ(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.params.SolrParams args, String... tests) throws Exception
      Pass "null" for the client to query the local server
      Throws:
      Exception
    • assertQ

      public static void assertQ(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.params.SolrParams args, String... tests) throws Exception
      Pass "null" for the client to query to the local server. Fetches response in xml format and matches with the given set of xpaths
      Throws:
      Exception
    • matchJSON

      public static void matchJSON(String response, String... tests) throws Exception
      Throws:
      Exception
    • getQueryResponse

      public static String getQueryResponse(org.apache.solr.client.solrj.SolrClient client, String wt, org.apache.solr.common.params.SolrParams params) throws Exception
      Throws:
      Exception
    • getQueryResponse

      public static String getQueryResponse(String wt, org.apache.solr.common.params.SolrParams params) throws Exception
      Throws:
      Exception
    • getJSON

      public static String getJSON(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.params.SolrParams params) throws Exception
      Throws:
      Exception
    • add

      public static Long add(org.apache.solr.client.solrj.SolrClient client, org.apache.solr.common.SolrInputDocument sdoc, org.apache.solr.common.params.ModifiableSolrParams params) throws Exception
      Adds a document using the specific client, or to the local test core if null. Returns the version. TODO: work in progress... version not always returned.
      Throws:
      Exception