title: operations parent: Workload Reference grand_parent: Reference nav_order: 100

operations

Operations define the actions performed during a test procedure. They are referenced from test procedure schedules.

Syntax

Operations can be defined inline in a schedule or in a top-level "operations" section:

{
  "operations": [
    {
      "name": "my-search",
      "operation-type": "search",
      "body": {
        "query": "*:*",
        "rows": 10
      }
    }
  ]
}

Built-in operation types

bulk-index

{
  "operation-type": "bulk-index",
  "bulk-size": 500,
  "collection": "my_collection"
}
ParameterDefaultDescription
bulk-size500Number of documents per batch
collection(first collection in workload)Target collection
corpora(all corpora)Corpus name to index from
commitfalseIf true, issue a hard commit to Solr after each batch

search

The search operation supports two styles.

JSON body style — passes a full Solr JSON Request API object:

{
  "operation-type": "search",
  "body": {
    "query": "*:*",
    "rows": 10,
    "fl": "id,title"
  },
  "collection": "my_collection"
}

Classic params style — individual Solr query parameters as top-level fields:

{
  "operation-type": "search",
  "q": "city:New York",
  "fl": "id,name",
  "rows": 10,
  "fq": "type:restaurant",
  "sort": "score desc",
  "request-params": {
    "defType": "edismax"
  },
  "collection": "my_collection"
}
ParameterDefaultDescription
body(none)Full Solr JSON query body (JSON Request API format). Takes precedence over classic params if both are present
q*:*Query string (classic params style)
fl(none)Field list to return
rows(none)Number of documents to return
fq(none)Filter query
sort(none)Sort order
request-params{}Additional Solr query parameters appended to the request
collection(first collection in workload)Target collection

commit

{ "operation-type": "commit" }

Issues a hard commit to Solr. Also registered as refresh.

ParameterDefaultDescription
collection(first collection in workload)Target collection
soft-commitfalseIf true, issues a soft commit instead of a hard commit

optimize

{ "operation-type": "optimize", "max-segments": 1 }

Issues a force-merge (optimize) to reduce the segment count to max-segments (default: 1).

wait-for-merges

{ "operation-type": "wait-for-merges" }

Polls the Solr node metrics API until no active merge operations remain across any core, or the timeout is reached.

ParameterDefaultDescription
collection(first collection in workload)Target collection
retry-wait-period2.0Seconds between polling attempts
max-wait-seconds3600Maximum seconds to wait before giving up

paginated-search

{
  "operation-type": "paginated-search",
  "q": "my query",
  "rows": 100,
  "sort": "id asc"
}

Executes a cursor-paginated Solr search using Solr's cursorMark deep pagination API. Fetches all result pages and returns the total document count. Also registered as scroll-search.

ParameterDefaultDescription
collection(first collection in workload)Target collection
q*:*Query string
rows100Page size (documents per request)
sortid ascSort order — must include a uniqueKey field for cursor pagination to work
fl(none)Field list to return
fq(none)Filter query
request-params{}Additional Solr query parameters

create-collection

{
  "operation-type": "create-collection",
  "collection": "my_collection",
  "configset-path": "configsets/my_schema",
  "num-shards": 1,
  "replication-factor": 1
}
ParameterDefaultDescription
collection(required)Collection name
configset(collection name)Configset name to use; defaults to the collection name
configset-path(none)Path to local configset directory (relative to workload dir)
num-shards1Number of shards
replication-factor1Number of NRT replicas per shard
tlog-replicas0Number of TLOG replicas per shard
pull-replicas0Number of pull replicas per shard
delete-configset-on-errortrueDelete uploaded configset if collection creation fails

delete-collection

{
  "operation-type": "delete-collection",
  "collection": "my_collection"
}
ParameterDefaultDescription
collection(required)Collection name to delete
configset(collection name)Configset name to delete alongside the collection
delete-configsettrueIf true, also deletes the associated configset
ignore-missingtrueIf true, silently succeeds if the collection does not exist

raw-request

{
  "operation-type": "raw-request",
  "path": "/api/collections/my_collection/config",
  "method": "POST",
  "body": {
    "set-property": {
      "updateHandler.autoSoftCommit.maxTime": "5000"
    }
  }
}

Executes an arbitrary HTTP request against the Solr Admin API (/api/... V2 endpoints).

ParameterDefaultDescription
path(required)API path, e.g. /api/collections/my_coll/config
methodGETHTTP method: GET, POST, DELETE
body(none)Request body (JSON object)
headers{}Additional HTTP headers

sleep

{ "operation-type": "sleep", "duration": 5 }

Pauses the schedule for the specified number of seconds. Useful between tasks that need a settling period (for example, after a commit before running queries).

ParameterDefaultDescription
duration(required)Seconds to sleep

composite

{
  "operation-type": "composite",
  "operations": [
    { "operation-type": "bulk-index", "bulk-size": 500 },
    { "operation-type": "commit" }
  ]
}

Groups multiple operations into a single logical unit. Operations within the composite execute sequentially; the composite completes when all child operations finish. Useful for measuring end-to-end latency of a multi-step sequence.

ParameterDefaultDescription
operations(required)Array of operation definitions to execute in sequence

retry wrapper

Any operation can be wrapped with retry logic by adding retry parameters directly to the operation definition:

{
  "operation-type": "bulk-index",
  "bulk-size": 500,
  "retries": 3,
  "retry-wait-period": 0.5,
  "retry-on-timeout": true,
  "retry-on-error": true
}
ParameterDefaultDescription
retries0Number of times to retry on failure
retry-until-successfalseIf true, retry indefinitely until the operation succeeds
retry-wait-period0.5Seconds to wait between retry attempts
retry-on-timeouttrueRetry when a timeout error occurs
retry-on-errorfalseRetry when any other error occurs

Backup operations

The following backup-related operation types are registered but not yet implemented in this release: create-backup, restore-backup, create-backup-repository, delete-backup-repository, wait-for-backup-create. Use raw-request to call the Solr Backup V2 API directly.