Connect to Your Opensolr Index: Address and Login

Host, Port, Path and the login

Address and login

To send data to your Opensolr Index or search it from your own code, you need its address and its login. Both are in the control panel of the index, on the Info tab.

01 · The address

The Info tab shows three values: Host, Port and Path. Put them together and add what you want the index to do.

https:// HOST /solr/INDEX /select?q=*:* port 443 Host Path request https:// port 443 HOST Host /solr/INDEX Path /select?q=*:* request
Host, Port and Path come from the Info tab; the request is yours.
https://HOST/solr/INDEX/select?q=*:*&wt=json
  • Port reads 80 or 443: use https://, which is port 443. Indexes in China show port 80 (8080 for clusters) and are reached over http://.
  • Path is solr/ followed by the index name (solrcloud/ on SolrCloud servers).
  • For a cluster, use the Host shown on the Info tab of the cluster master.

02 · The login

Every Opensolr Index is protected by HTTP Basic Auth. A new index starts with the username opensolr and your master API key as the password. The key is on the Dashboard, under Master REST API Key.

03 · Try it

curl -u opensolr:YOUR_API_KEY "https://HOST/solr/INDEX/select?q=*:*&wt=json"

Or click Solr Query in the Quick Actions bar; your browser asks for the same login.

04 · Who may connect

A new index accepts connections from every IP address. To allow only your own servers, add rules in the Security tab: IP restriction. Calling the index from JavaScript in a browser: CORS and Ajax requests.

Dashboard