﻿---
title: index cli command
description: Index a single documentation set into Elasticsearch. Builds the documentation set in metadata-only mode and streams the output to Elasticsearch. Does...
url: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/2927/cli/cmd-index
products:
  - Elastic Docs Builder
---

# index cli command
```bash
docs-builder index [options]
```
> Authentication is required.
Index a single documentation set into Elasticsearch.

## Options

<definitions>
  <definition term="--endpoint string">
    -es,--endpoint, Elasticsearch endpoint URL. Falls back to env DOCUMENTATION_ELASTIC_URL.
    **Constraints:** must be a http or https URI
  </definition>
  <definition term="--api-key string">
    API key for authentication. Falls back to env DOCUMENTATION_ELASTIC_APIKEY.
  </definition>
  <definition term="--username string">
    Username for basic authentication. Falls back to env DOCUMENTATION_ELASTIC_USERNAME.
  </definition>
  <definition term="--password string">
    Password for basic authentication. Falls back to env DOCUMENTATION_ELASTIC_PASSWORD.
  </definition>
  <definition term="--[no-]ai-enrichment">
    Enable AI enrichment of documents using LLM-generated metadata (enabled by default).
  </definition>
  <definition term="--search-num-threads int">
    Number of search threads for the inference endpoint.
    **Constraints:** between 1 and 128
  </definition>
  <definition term="--index-num-threads int">
    Number of index threads for the inference endpoint.
    **Constraints:** between 1 and 128
  </definition>
  <definition term="--[no-]eis">
    Use the Elastic Inference Service to bootstrap the inference endpoint (enabled by default).
  </definition>
  <definition term="--bootstrap-timeout string">
    How long to wait for the inference endpoint to become ready (e.g. 4m, 90s).
    **Constraints:** duration between "1s" and "60m"
  </definition>
  <definition term="--[no-]force-reindex">
    Force a full reindex, discarding any incremental state.
  </definition>
  <definition term="--buffer-size int">
    Number of documents per bulk request.
    **Constraints:** between 1 and 10000
  </definition>
  <definition term="--max-retries int">
    Number of retry attempts for failed bulk items.
    **Constraints:** between 0 and 20
  </definition>
  <definition term="--[no-]debug-mode">
    Log every Elasticsearch request and response body; append ?pretty to all requests.
  </definition>
  <definition term="--proxy-address string">
    Route requests through this proxy URL.
    **Constraints:** must be a http or https URI
  </definition>
  <definition term="--proxy-username string">
    Proxy server username.
  </definition>
  <definition term="--proxy-password string">
    Proxy server password.
  </definition>
  <definition term="--[no-]disable-ssl-verification">
    Disable SSL certificate validation. Use only in controlled environments.
  </definition>
  <definition term="--certificate-fingerprint string">
    SHA-256 fingerprint of a self-signed server certificate.
  </definition>
  <definition term="--certificate-path string">
    Path to a PEM or DER certificate file for SSL validation.
    **Constraints:** symbolic links not allowed, must exist, extensions: pem, der, crt, cer, supports `~` home expansion
  </definition>
  <definition term="--[no-]certificate-not-root">
    Set when the certificate is an intermediate CA rather than the root.
  </definition>
  <definition term="--path string">
  </definition>
  <definition term="-l --log-level enum">
    Minimum log level.
    **Values:** trace, debug, information, warning, error, critical, none
    **Default:** `information`
  </definition>
  <definition term="-c --config-source enum">
    Override the configuration source: local, remote
    **Values:** local, remote, embedded
  </definition>
  <definition term="--[no-]skip-private-repositories">
    Skip cloning private repositories
  </definition>
</definitions>


## Notes

Builds the documentation set in metadata-only mode and streams the output to Elasticsearch.
Does not write HTML to disk. Requires a running cluster and valid credentials.