Skip to main content
The Blob Store REST API allows storing binary objects in Solr. The primary use case for this is to store entity extraction models, lookup lists or exclusion lists for use in index pipelines. This may include the entity extraction models and lookup lists included with Fusion in the https://FUSION_HOST:FUSION_PORT/data/nlp directory, or files that you have created on your own. You can also work with blobs in the Fusion UI using the blob manager. Blobs uploaded to Solr with this REST API are stored in the system_blobs collection.

Blob Types

A resourceType query parameter can be used to specify the a blob type. For example, specify plugin:connector when uploading a connector, like this:
curl -H 'content-type:application/zip' -X PUT 'fusion-host:8764/api/blobs/myplugin?resourceType=plugin:connector' --data-binary @myplugin.zip
The complete list of valid values for resourceType is below:
TypeDescription
bananaA Banana dashboard
catalogAn analytics catalog
driver:jdbcA Upload a JDBC Driver to Fusion Server
file:js-indexA JavaScript file for use with a Managed Javascript index stage.
file:js-queryA JavaScript file for use with a Managed Javascript query stage.
fileAny uploaded file, such as from the Quickstart or the Index Workbench.
model:ml-modelA machine learning model (Fusion AI only)
model:open-nlpAn OpenNLP model (Fusion AI only)
otherA blob of unknown type If no resourceType is specified on upload, “other” is assigned by default.
plugin:connectorA Fusion 4.x connector
The JDBC connector fetches documents from a relational database via SQL queries. Under the hood, this connector implements the Solr DataImportHandler (DIH) plugin.Fusion stores JDBC drivers in the blob store. You can upload a driver using the Fusion UI or the Blob Store API.
  • The JDBC V1 connector is supported in Fusion releases 5.3 and earlier.
  • The JDBC V2 connector is supported in Fusion releases 5.4 and later.

How to upload a JDBC driver using the Fusion UI

  1. In the Fusion UI, navigate to System > Blobs.
  2. Click Add.
  3. Select JDBC Driver.
    The “New ‘JDBC Driver’ Upload” panel appears.
    Uploading a connector
  4. Click Choose File and select the .jar file from your file system. Uploading connector
  5. Click Upload.
    The new driver’s blob manifest appears.
    Uploaded connector
From this screen you can also delete or replace the driver.

How to install a JDBC driver using the API

  1. Upload the JAR file to Fusion’s blob store using the /blobs/{id} endpoint. Specify an arbitrary blob ID, and a resourceType value of plugin:connector, as in this example:
    curl -u USERNAME:PASSWORD -H "content-type:application/java-archive" -H "content-length:707261" -X PUT --data-binary @postgresql-42.0.0.jar http://localhost:8764/api/blobs/mydriver?resourceType=driver:jdbc
    
    Success response:
    {
      "name" : "mydriver",
      "contentType" : "application/java-archive",
      "size" : 707261,
      "modifiedTime" : "2017-06-09T19:00:48.919Z",
      "version" : 0,
      "md5" : "c67163ca764bfe632f28229c142131b5",
      "metadata" : {
        "subtype" : "driver:jdbc",
        "drivers" : "org.postgresql.Driver",
        "resourceType" : "driver:jdbc"
      }
    }
    
    Fusion automatically publishes the event to the cluster, and the listeners perform the driver installation process on each node.
    If the blob ID is identical to an existing one, the old driver will be uninstalled and the new driver will installed in its place. To get the list of existing blob IDs, run: curl -u USERNAME:PASSWORD https://FUSION_HOST:FUSION_PORT/api/blobs
  2. To verify the uploaded driver, run:
    curl -u USERNAME:PASSWORD https://FUSION_HOST:FUSION_PORT/api/blobs/BLOB_ID/manifest
    
    Where the BLOB_ID is the name specified during upload, such as “mydriver” above. A success response looks like this:
    {
      "name" : "mydriver",
      "contentType" : "application/java-archive",
      "size" : 707261,
      "modifiedTime" : "2017-06-09T19:05:17.897Z",
      "version" : 1569755095787110400,
      "md5" : "c67163ca764bfe632f28229c142131b5",
      "metadata" : {
        "subtype" : "driver:jdbc",
        "drivers" : "org.postgresql.Driver",
        "resourceType" : "driver:jdbc"
      }
    }
    

How to manually upload a JDBC V1 driver for Fusion 4.x.x releases

For Fusion 4.x.x release levels, it is recommended that you upload the JDBC driver jar files manually. This prevents some issues with dynamically loading the driver causing errors, particularly with Oracle and Microsoft SQL drivers.The following steps specify how to upload a JDBC driver JAR file to Fusion manually. The example uses the Microsoft SQL Server JDBC driver mssql-jdbc-6.6.2-jre8.jar file.
  1. Delete the JDBC V1 driver uploaded using the Blob store upload window.
  2. Save the JDBC V1 driver JAR file to the apps/lib folder. For example: apps\libs\mssql-jdbc-6.2.2.jre8.jar
  3. Open the apps/jetty/connectors-classic/webapps/connectors-extra-classpath.txt file and add the following line: apps/libs/mssql-jdbc-6.2.2.jre8.jar
  4. Restart connectors-classic.
  5. Specify the JDBC driver class name in the Manually uploaded JDBC Driver Name field.
  6. Enter com.microsoft.sqlserver.jdbc.SQLServerDriver in the JDBC Driver Name field.
The Quickstart is a wizard that lets you explore some of Fusion’s core capabilities:
  • Creating or selecting an app
  • Selecting a collection (where data is stored)
  • Indexing data
  • Searching
LucidAcademyLucidworks offers free training to help you get started.The Course for Using The Quickstart Wizard focuses on using the wizard to practice using the key functions of Fusion:
Using The Quickstart WizardPlay Button
Visit the LucidAcademy to see the full training catalog.

Step through the Quickstart wizard

If it is not already open, open the Quickstart wizard. In the Fusion launcher, click New here? Get started….Quickstart
  1. Click Continue. On the Select an App screen, you can select or create an app for your quickstart data. quickstart-1 If you click Create new app, Fusion prompts you to enter an app name (and optionally a description), then click Create App to return to the Quickstart. Your new app is selected by default.
  2. After selecting an app, click Continue. On the Select a Collection screen, you can select or create a collection for your quickstart data. A collection with the same name as your app is created automatically: quickstart-2
  3. Click Continue.
    On the Index Data screen, you can either select one of the built-in sample datasets or click Use my data to upload your own:
    quickstart-3
  4. Click Continue.
    On the Query Data screen, you can see all search results and enter your own search queries to test the indexed dataset. You can also select the display fields or view the parsed documents:
    quickstart-4
  5. Click Continue. quickstart-5 From here, you can do the following:
In Fusion 4.x, connectors are installed by uploading them to the blob store. You can use any of these methods to install a connector:
  • By installing connectors as “bootstrap plugins”, that is, by putting them in the bootstrap-plugins directory during initial installation or an upgrade
  • By using the Blob Store UI after installation or an upgrade
  • By using the Blob Store API after installation or an upgrade.
During upgrades, the migrator handles some aspects of installing connectors. Depending on the target version and the presence or absence of an Internet connection, there might be manual steps. Installing connectors during upgrades is explained where needed in the upgrade procedures.
After you install a connector, you can Configure A New Datasource.
You can view and download all current and previous V2 connector releases at plugins.lucidworks.com.

Install a connector as a bootstrap plugin

Fusion can install connectors as “bootstrap plugins.” All this means is that you put the connector zip files in a specific directory named bootstrap-plugins, and Fusion installs the connectors the first time it starts during initial installation or an upgrade.
  1. Download the connector zip file from Fusion 4.x Connector Downloads.
    Do not expand the archive; Fusion consumes it as-is. Also, do not start Fusion until instructed to do so by the installation or upgrade instructions.
  2. Under the version-numbered Fusion directory, place the connector in the directory apps/connectors/bootstrap-plugins/ (on Unix) or \apps\connectors\bootstrap-plugins\ (on Windows).
  3. Start Fusion when instructed to do so in the installation or upgrade procedure.

Install or update a connector using the Blob Store UI

  1. Download the connector zip file from Fusion 4.x Connector Downloads.
    Do not expand the archive; Fusion consumes it as-is.
  2. In the Fusion workspace, navigate to System > Blobs.
  3. Click Add.
  4. Select Connector Plugin. Add a connector The “New Connector Plugin Upload” panel appears.
  5. Click Choose File and select the downloaded zip file from your file system. Upload a connector
  6. Click Upload.
    The new connector’s blob manifest appears.
    Uploaded connector From this screen you can also delete or replace the connector.

Install or update a connector using the Blob Store API

  1. Download the connector zip file from Fusion 4.x Connector Downloads.
    Do not expand the archive; Fusion consumes it as-is.
  2. Upload the connector zip file to Fusion’s blob store.
    Specify an arbitrary blob ID, and a resourceType value of plugin:connector, as in this example:
    curl -H 'content-type:application/zip' -X PUT 'localhost:8764/api/blobs/myplugin?resourceType=plugin:connector' --data-binary @myplugin.zip
    
    Fusion automatically publishes the event to the cluster, and the listeners perform the connector installation process on each node.
    If the blob ID is identical to an existing one, the old connector will be uninstalled and the new connector will installed in its place. To get the list of existing blob IDs, run: curl -u USERNAME:PASSWORD localhost:8764/api/blobs
  3. Look in https://FUSION_HOST:FUSION_PORT/apps/connectors/plugins/ to verify the new connector is installed.

Reinstall a connector

To reinstall a connector for any reason, first delete the connector then use the preceding steps to install it again. This may take a few minutes to complete depending on how quickly the pods are deleted and recreated.

Examples

Upload a JavaScript file to the blob store

REQUEST
curl -u USERNAME:PASSWORD -X PUT -H 'Content-Type: text/javascript' --data-binary @query-pipeline-js-stage.js https://FUSION_HOST:8764/api/blobs/query-pipeline-js-stage.js?resourceType=file:js-query
The response is empty.

Verify that the JavaScript blob was uploaded

REQUEST
curl -u USERNAME:PASSWORD https://FUSION_HOST:8764/api/blobs?resourceType=file:js-query
RESPONSE
[{
  "id": "query-pipeline-js-stage.js",
  "path": "/query-pipeline-js-stage.js",
  "dir": "/",
  "filename": "query-pipeline-js-stage.js",
  "contentType": "text/javascript",
  "size": 0,
  "modifiedTime": "2018-09-11T16:23:17.743Z",
  "version": 1611328911094841344,
  "md5": "d41d8cd98f00b204e9800998ecf8427e",
  "metadata": {
    "resourceType": "file:js-query"
  }
}]

Upload an OpenNLP sentence model binary file to the blob store

REQUEST
curl -u USERNAME:PASSWORD -X PUT --data-binary @data/nlp/models/en-sent.bin -H 'Content-type: application/octet-stream' https://FUSION_HOST:8764/api/blobs/sentenceModel.bin
In this example, we have changed the name of the blob during upload by giving it a different ID. The file is named ‘en-sent.bin’ but we have defined the ID of this to ‘sentenceModel.bin’. When we use this blob in an index pipeline, we would refer to it by the ID we have given it.

Get the manifest for a sentence OpenNLP model we have previously saved in the blob store

REQUEST
curl -u USERNAME:PASSWORD -X HEAD https://FUSION_HOST:8764/api/blobs/sentenceModel.bin
RESPONSE
{
  "name": "sentenceModel.bin",
  "contentType": "application/octet-stream",
  "size": 98533,
  "modifiedTime": "2014-09-08T18:50:07.559Z",
  "version": 1478704189996531712,
  "md5": "3822c5f82cb4ba139284631d2f6b7fde"
}

Upload a JDBC driver, using slashes in the blob name

REQUEST
curl -u USERNAME:PASSWORD -X PUT --data-binary @postgresql-42.0.0.jar -H 'Content-length: 6' -H 'Content-type: application/octet-stream' https://FUSION_HOST:8764/api/blobs/good/to/go/jdbcDriverFile?resourceType=driver:jdbc
RESPONSE
{
  "name": "good/to/go/jdbcDriverFile",
  "contentType": "application/octet-stream",
  "size": 6,
  "modifiedTime": "2017-04-04T15:58:32.856Z",
  "version": 0,
  "md5": "b1946ac92492d2347c6235b4d2611184",
  "metadata": {
    "subtype": "driver:jdbc",
    "resourceType": "driver:jdbc"
  }
}

Get the JDBC driver that was uploaded

REQUEST
curl -u USERNAME:PASSWORD https://FUSION_HOST:8764/api/blobs?resourceType=driver:jdbc
RESPONSE
[{
  "name": "good/to/go/jdbcDriverFile",
  "contentType": "application/octet-stream",
  "size": 6,
  "modifiedTime": "2017-04-04T06:21:53.465Z",
  "version": 1563727666574524416,
  "md5": "b1946ac92492d2347c6235b4d2611184",
  "metadata": {
    "subtype": "driver:jdbc",
    "resourceType": "driver:jdbc"
  }
}]
I