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

Method normalizeSolrUrl

solr/core/src/java/org/apache/solr/cli/CLIUtils.java:185–187  ·  view source on GitHub ↗

Strips off the end of solrUrl any /solr when a legacy solrUrl like http://localhost:8983/solr is used, and warns those users. In the future we'll have urls ending with /api as well. @param solrUrl The user supplied url to Solr. @return a URL without any path, e.g. http://localhost:8983

(String solrUrl)

Source from the content-addressed store, hash-verified

183 * @return a URL without any path, e.g. {@code http://localhost:8983}
184 */
185 public static String normalizeSolrUrl(String solrUrl) {
186 return normalizeSolrUrl(solrUrl, true);
187 }
188
189 /**
190 * Strips off the end of solrUrl any /solr when a legacy solrUrl like http://localhost:8983/solr

Callers 15

testResolveSolrUrlMethod · 0.95
doRemoteModeMethod · 0.95
runImplMethod · 0.95
runAssertMethod · 0.95
createCoreMethod · 0.95
createCollectionMethod · 0.95
runImplMethod · 0.95
runImplMethod · 0.95
runImplMethod · 0.95
runImplMethod · 0.95
runExampleMethod · 0.95

Calls 15

errMethod · 0.95
getDefaultSolrUrlMethod · 0.95
getCloudSolrClientMethod · 0.95
getBaseUrlForNodeNameMethod · 0.95
createMethod · 0.65
toStringMethod · 0.65
resolveMethod · 0.65
lengthMethod · 0.65
getMethod · 0.65
getLiveNodesMethod · 0.65

Tested by 1

testResolveSolrUrlMethod · 0.76