Class SolrTestCaseHS

    • Constructor Detail

      • SolrTestCaseHS

        public SolrTestCaseHS()
    • Method Detail

      • 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)
      • 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
      • clearQueryCache

        public static void clearQueryCache()
      • 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