Package org.apache.solr.cli
Class ApiTool
- java.lang.Object
-
- org.apache.solr.cli.ToolBase
-
- org.apache.solr.cli.ApiTool
-
-
Constructor Summary
Constructors Constructor Description ApiTool()
Used to send an arbitrary HTTP request to a Solr API endpoint.ApiTool(PrintStream stdout)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
callGet(String url)
String
getName()
Defines the interface to a Solr tool that can be run from this command-line app.List<org.apache.commons.cli.Option>
getOptions()
static org.apache.solr.common.params.ModifiableSolrParams
getSolrParamsFromUri(URI uri)
static String
getSolrUrlFromUri(URI uri)
Get Solr base url with port if present and root from URIvoid
runImpl(org.apache.commons.cli.CommandLine cli)
-
Methods inherited from class org.apache.solr.cli.ToolBase
echo, echoIfVerbose, runTool
-
-
-
-
Constructor Detail
-
ApiTool
public ApiTool()
Used to send an arbitrary HTTP request to a Solr API endpoint.
-
ApiTool
public ApiTool(PrintStream stdout)
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:Tool
Defines the interface to a Solr tool that can be run from this command-line app.
-
getOptions
public List<org.apache.commons.cli.Option> getOptions()
-
runImpl
public void runImpl(org.apache.commons.cli.CommandLine cli) throws Exception
-
getSolrUrlFromUri
public static String getSolrUrlFromUri(URI uri)
Get Solr base url with port if present and root from URI- Parameters:
uri
- Full Solr URI (e.g. http://localhost:8983/solr/admin/info/system)- Returns:
- Solr base url with port and root (from above example http://localhost:8983/solr)
-
getSolrParamsFromUri
public static org.apache.solr.common.params.ModifiableSolrParams getSolrParamsFromUri(URI uri)
-
-