Package org.apache.solr.cli
Class ApiTool
java.lang.Object
org.apache.solr.cli.ToolBase
org.apache.solr.cli.ApiTool
- All Implemented Interfaces:
Tool
Supports api command in the bin/solr script.
Used to send an arbitrary HTTP request to a Solr API endpoint.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetName()Defines the interface to a Solr tool that can be run from this command-line app.org.apache.commons.cli.OptionsRetrieve theOptionssupported by this tool.static org.apache.solr.common.params.ModifiableSolrParamsgetSolrParamsFromUri(URI uri) static StringgetSolrUrlFromUri(URI uri) Get Solr base url with port if present and root from URIvoidrunImpl(org.apache.commons.cli.CommandLine cli) Methods inherited from class org.apache.solr.cli.ToolBase
echo, echoIfVerbose, getConnectionOptions, getRuntime, isVerbose, runTool
-
Constructor Details
-
ApiTool
-
-
Method Details
-
getName
Description copied from interface:ToolDefines the interface to a Solr tool that can be run from this command-line app. -
getOptions
public org.apache.commons.cli.Options getOptions()Description copied from interface:ToolRetrieve theOptionssupported by this tool.- Specified by:
getOptionsin interfaceTool- Overrides:
getOptionsin classToolBase- Returns:
- The
Optionsthis tool supports.
-
runImpl
-
callGet
- Throws:
Exception
-
getSolrUrlFromUri
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
-