MCPcopy Create free account
hub / github.com/apache/solr / getSolrUrlFromUri

Method getSolrUrlFromUri

solr/core/src/java/org/apache/solr/cli/ApiTool.java:107–109  ·  view source on GitHub ↗

Get Solr base url with port if present and root from URI @param uri Full Solr URI (e.g. http://localhost:8983/solr/admin/info/system) @return Solr base url with port and root (from above example http://localhost:8983/solr)

(URI uri)

Source from the content-addressed store, hash-verified

105 * @return Solr base url with port and root (from above example http://localhost:8983/solr)
106 */
107 public static String getSolrUrlFromUri(URI uri) {
108 return uri.resolve("/" + uri.getPath().split("/")[1]).toString();
109 }
110
111 public static ModifiableSolrParams getSolrParamsFromUri(URI uri) {
112 ModifiableSolrParams paramsMap = new ModifiableSolrParams();

Callers 2

testSolrUrlParsingMethod · 0.95
callGetMethod · 0.95

Calls 4

toStringMethod · 0.65
resolveMethod · 0.65
getPathMethod · 0.65
splitMethod · 0.45

Tested by 1

testSolrUrlParsingMethod · 0.76