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=*:*&wt=json
- Port reads
80 or 443: usehttps://, which is port 443. Indexes in China show port 80 (8080 for clusters) and are reached overhttp://. - 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.
- Change the username and password of an index in its Security tab: HTTP Basic Auth.
- Generating a new API key on the Dashboard does not change the password of your indexes.
- Background: Default HTTP Auth Credentials.
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
- Dashboard
- Connect to your index
- Bandwidth
- Disk space
- Quick Actions