Shared Cluster Quick Start Guide


A “Shared Cluster Index” is a single Solr collection under your management that shares space with other collections on a Solr cluster (a “Shared Infrastructure”) that is managed by SearchStax. The index owners have no access to each other’s data.

The Shared-Cluster indexes are for simple Solr projects that do not require advanced features such as backups, disaster-recovery, alerting, vanity DNS, and others that come with our dedicated Solr deployments. The shared indexes are also a fraction of the cost of the dedicated deployments.

This SearchStax Shared Cluster Quick Start page contains everything you need to know to take the SearchStax Cloud platform for a test drive. We supply the standard Solr configuration for you to use. We also supply a sample file of documents for you to load and query.

Note that the examples use cURL from a Linux Bash window, but the same examples will work from a Cygwin window on Windows.

Contents of this Solr Guide:

  1. Set Up an Account
  2. Create a Shared Index
  3. Obtain the Data File
  4. Upload Documents to Solr
  5. Search the Index

1. Set Up an Account

To sign up as a SearchStax Shared Cluster Index user, go to the SearchStax Free-Trial page. You may create a single shared index and experiment with it for 14 days, free of charge. No credit card number is required.

Account creation involves registering your email address and providing a password. Our system will send an activation email to you. Once you respond, you can log into SearchStax Cloud.

2. Create a Shared-Cluster Index

Shared indexes are created from the SearchStax Dashboard.

Navigate to the Shared Infrastructure screen. When there are no existing Shared Indexes, the system goes directly to the New Index screen.

The first part of setting up an index is to choose your Solr infrastructure and billing options.

  1. The Shared Cluster plan places your index on a Solr cluster that also transparently supports other indexes. The clients share the cost of the cluster. The indexes are securely isolated from one another.
  2. Give your index a Name.
  3. Select the Region that is closest to your data center. (For the initial release of Shared-Cluster Indexes, we offer only the AWS US-East region.)
  4. SearchStax supports many Solr Versions. (For the initial release of Shared-Cluster Indexes, we offer only Solr 8.11.1.)
  5. Available Terms: Make a term selection here to see the billing rates change in the Specifications below.
  6. Choose a Specification that fits your requirements and budget.
  7. Click the Next button.

At this point, we see the Index Configuration screen. This is where we set up the index’s configuration files.

  1. There are three prepared profiles and one “custom” one–which means you can upload your own configuration as a *.zip file. For this exercise, choose the Basic Configuration. This is the Solr default.
  2. Once you’ve selected a configuration, click the Load Configuration button to load the files.
  3. You can examine and edit the configuration files directly on this page. For instance, it is often necessary to add fields to the managed schema file (but not for this exercise).
  4. After your edits, click the Continue button.

It takes thirty seconds or so to create the new index.

Find your index in the Shared Clusters Index List and click on the Index Name. This opens the Index Details display.

Note the Copy Icons beside the Solr Endpoints and the two Token Keys. You will need the endpoints and keys when you upload data and when you search the index (see instructions below).

3. Obtain the Data File

For the purposes of this exercise, we need to upload a file containing a minimum number of documents. We call this file sample.json. It is a simple text file containing two records:

[
 {"id" : "TestDoc1", "title_s" : "test1"},
 {"id" : "TestDoc2", "title_s" : "another test"}
]

Save this file in a convenient location.

4. Upload Documents to Solr

To upload the sample.json file to your new index, open a Bash command window (Linux) or a Cygwin command window (Windows). Navigate to the directory containing sample.json. We’re going to issue the following cURL command:

$ curl -X POST -H 'Content-type:application/json' -d @sample.json "<Update Endpoint>?commit=true" -H "Authorization: Token <Write Token>"

You’ll have to paste in the Solr /update (write) endpoint and the Write Token values.

This is how it looks with all values filled in:

$ curl -X POST -H 'Content-type:application/json' -d @sample.json "https://searchcloud-us-east-1.searchstax.com/xxx/QuickStart/update?commit=true" -H "Authorization: Token 934d3a3977a55caaae2f3cf13123456395338112"

Solr returns a message similar to this one when the upload is successful:

{
  "responseHeader":{
    "rf":2,
    "status":0,
    "QTime":96}}

Your index now has two documents in it.

To search the index, we use another simple cURL command:

$ curl "<Select Endpoint>?q=*:*&wt=json&indent=true" -H "Authorization: Token <Read Token>"

Copy the <Select Endpoint> and the <Read Token> from the Index Details page (above). Paste them into the cURL commmand:

$ curl "https://searchcloud-us-east-1.searchstax.com/xxx/QuickStart/select?q=*:*&wt=json&indent=true" -H "Authorization: Token 16778e7556f23a67ea4b1bcc01234595338a2b95"

Solr returns the search results as a JSON document similar to this:

{
  "responseHeader":{
    "zkConnected":true,
    "status":0,
    "QTime":0,
    "params":{
      "q":"*:*",
      "indent":"true",
      "wt":"json"}},
  "response":{"numFound":2,"start":0,"numFoundExact":true,"docs":[
      {
        "id":"TestDoc1",
        "title_s":"test1",
        "_version_":1736451347350290432},
      {
        "id":"TestDoc2",
        "title_s":"another test",
        "_version_":1736451347351339008}]
  }}

As you can see, Solr has found our two test documents.

That’s all there is to it. Solr is up and running.

Contact Us!

Don’t hesitate to reach out to the SearchStax Support Desk. We are happy to answer your questions.

Was this article helpful?
YesNo