Class ClientUtils


  • public class ClientUtils
    extends Object
    Since:
    solr 1.3
    • Constructor Detail

      • ClientUtils

        public ClientUtils()
    • Method Detail

      • encodeLocalParamVal

        public static String encodeLocalParamVal​(String val)
        Returns the (literal) value encoded properly, so it can be appended after a name= local-param key.

        NOTE: This method assumes $ is a literal character that must be quoted. (It does not assume strings starting $ should be treated as param references)

      • addSlices

        public static void addSlices​(Map<String,​Slice> target,
                                     String collectionName,
                                     Collection<Slice> slices,
                                     boolean multiCollection)
        Constructs a slices map from a collection of slices and handles disambiguation if multiple collections are being queried simultaneously
      • shouldApplyDefaultCollection

        public static boolean shouldApplyDefaultCollection​(String providedCollection,
                                                           SolrRequest<? extends SolrResponse> request)
        Determines whether any SolrClient "default" collection should apply to the specified request
        Parameters:
        providedCollection - a collection/core explicitly provided to the SolrClient (typically through SolrClient.request(SolrRequest, String)
        request - the SolrRequest being executed