Skip to main content
POST
/
index
/
{id}
Index a document
import requests

url = "https://{FUSION HOST}/api/index/{id}"

payload = {}
headers = {
    "Authorization": "Basic <encoded-value>",
    "Content-Type": "application/vnd.lucidworks-document"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "docs": [
    {
      "id": "<string>",
      "fields": [
        {
          "name": "<string>",
          "value": {},
          "metadata": {},
          "annotations": [
            {
              "type": "<string>",
              "start": 123,
              "end": 123,
              "features": {},
              "label": "<string>",
              "featureCount": 123
            }
          ]
        }
      ],
      "metadata": {},
      "commands": [
        {
          "name": "<string>",
          "params": {}
        }
      ],
      "hints": {}
    }
  ],
  "stats": {}
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Headers

contentType
string
default:application/octet-stream

MIME type

Path Parameters

id
string
required

The index profile ID

Query Parameters

simulate
boolean
default:false

Run the pipeline in "simulate" mode for these docs. Stages with "side-effects" are skipped.

echo
boolean
default:true

If true, indexed documents are included in the response.

echoMaxCount
integer<int32>
default:-1

The number of documents to include in the response, with -1 implying "all".

stats
boolean
default:false

Return statistics about pipeline processing events.

bufferDocsForSolr
boolean

If true, the SolrIndexStage buffers docs.

params
object
required

Indexing request parameters. The parameters of the indexing request.

contentSourceName
string
default:unknown

The filename on the source system.

throwOnError
boolean
default:false

Indicates whether the indexing operation should fail immediately if an error is encountered. When set to true, any error stops the entire operation. When set to false (default), indexing continues despite errors.

Body

The body is of type object.

Response

200 - application/json

OK

The indexed documents, plus statistics about the indexing operation. You can use this data to confirm that the results are as expected.

docs
object[]

One or more JSON objects representing the indexed documents.

stats
object

Statistics about the completed indexing operation.