Skip to content

Conversation

Mpdreamz
Copy link
Member

@Mpdreamz Mpdreamz commented Sep 23, 2025

This adds two specialized Elasticsearch index commands.

docs-builder assembler index

docs-builder assembler clone
docs-builder assembler index

Index the full documentation to Elasticsearch, calls docs-builder assembler build --exporters elasticsearch. Exposes more options

Usage: assembler index  [arguments...] [options...] [-h|--help] [--version]

Index documentation to Elasticsearch, calls `docs-builder assembler build --exporters elasticsearch`. Exposes more options

Arguments:
  [0] <string?>    Elasticsearch endpoint, alternatively set env DOCUMENTATION_ELASTIC_URL

Options:
  --environment <string?>                The --environment used to clone ends up being part of the index name (Default: null)
  --api-key <string?>                    Elasticsearch API key, alternatively set env DOCUMENTATION_ELASTIC_APIKEY (Default: null)
  --username <string?>                   Elasticsearch username (basic auth), alternatively set env DOCUMENTATION_ELASTIC_USERNAME (Default: null)
  --password <string?>                   Elasticsearch password (basic auth), alternatively set env DOCUMENTATION_ELASTIC_PASSWORD (Default: null)
  --no-semantic <bool?>                  Index without semantic fields (Default: null)
  --search-num-threads <int?>            The number of search threads the inference endpoint should use. Defaults: 8 (Default: null)
  --index-num-threads <int?>             The number of index threads the inference endpoint should use. Defaults: 8 (Default: null)
  --bootstrap-timeout <int?>             Timeout in minutes for the inference endpoint creation. Defaults: 4 (Default: null)
  --index-name-prefix <string?>          The prefix for the computed index/alias names. Defaults: semantic-docs (Default: null)
  --buffer-size <int?>                   The number of documents to send to ES as part of the bulk. Defaults: 100 (Default: null)
  --max-retries <int?>                   The number of times failed bulk items should be retried. Defaults: 3 (Default: null)
  --debug-mode <bool?>                   Buffer ES request/responses for better error messages and pass ?pretty to all requests (Default: null)
  --proxy-address <string?>              Route requests through a proxy server (Default: null)
  --proxy-password <string?>             Proxy server password (Default: null)
  --proxy-username <string?>             Proxy server username (Default: null)
  --disable-ssl-verification <bool?>     Disable SSL certificate validation (EXPERT OPTION) (Default: null)
  --certificate-fingerprint <string?>    Pass a self-signed certificate fingerprint to validate the SSL connection (Default: null)
  --certificate-path <string?>           Pass a self-signed certificate to validate the SSL connection (Default: null)
  --certificate-not-root <bool?>         If the certificate is not root but only part of the validation chain pass this (Default: null)

docs-builder index

Index a single documentation set (folder with docset.yml) to Elasticsearch, basically an alias to docs-builder --exporters elasticsearch but with way more options

docs-builder index
Usage: index  [arguments...] [options...] [-h|--help] [--version]

Index a single documentation set to Elasticsearch, calls `docs-builder --exporters elasticsearch`. Exposes more options

Arguments:
  [0] <string?>    Elasticsearch endpoint, alternatively set env DOCUMENTATION_ELASTIC_URL

Options:
  --path <string?>                       path to the documentation folder, defaults to pwd. (Default: null)
  --api-key <string?>                    Elasticsearch API key, alternatively set env DOCUMENTATION_ELASTIC_APIKEY (Default: null)
  --username <string?>                   Elasticsearch username (basic auth), alternatively set env DOCUMENTATION_ELASTIC_USERNAME (Default: null)
  --password <string?>                   Elasticsearch password (basic auth), alternatively set env DOCUMENTATION_ELASTIC_PASSWORD (Default: null)
  --no-semantic <bool?>                  Index without semantic fields (Default: null)
  --search-num-threads <int?>            The number of search threads the inference endpoint should use. Defaults: 8 (Default: null)
  --index-num-threads <int?>             The number of index threads the inference endpoint should use. Defaults: 8 (Default: null)
  --bootstrap-timeout <int?>             Timeout in minutes for the inference endpoint creation. Defaults: 4 (Default: null)
  --index-name-prefix <string?>          The prefix for the computed index/alias names. Defaults: semantic-docs (Default: null)
  --buffer-size <int?>                   The number of documents to send to ES as part of the bulk. Defaults: 100 (Default: null)
  --max-retries <int?>                   The number of times failed bulk items should be retried. Defaults: 3 (Default: null)
  --debug-mode <bool?>                   Buffer ES request/responses for better error messages and pass ?pretty to all requests (Default: null)
  --proxy-address <string?>              Route requests through a proxy server (Default: null)
  --proxy-password <string?>             Proxy server password (Default: null)
  --proxy-username <string?>             Proxy server username (Default: null)
  --disable-ssl-verification <bool?>     Disable SSL certificate validation (EXPERT OPTION) (Default: null)
  --certificate-fingerprint <string?>    Pass a self-signed certificate fingerprint to validate the SSL connection (Default: null)
  --certificate-path <string?>           Pass a self-signed certificate to validate the SSL connection (Default: null)
  --certificate-not-root <bool?>         If the certificate is not root but only part of the validation chain pass this (Default: null)

Semantic by default

--exporters elasticsearch is now using semantic fields by default.
--exporters semantic has been removed.

The specialized index commands expose --no-semantic to index without inference endpoints and semantic fields.

The build commands docs-builder, docs-builder assembler build, docs-builder assemble do not expose this to keep things simple.

Misc cleanup

docs-builder --help and docs-builder --version are now less noisy. None of our CLI filters nor DiagnosticCollector will no longer add to the output.

Elasticsearch export logs are slightly better.

@Mpdreamz Mpdreamz requested a review from a team as a code owner September 23, 2025 20:08
@Mpdreamz Mpdreamz requested a review from cotti September 23, 2025 20:08
@Mpdreamz Mpdreamz self-assigned this Sep 23, 2025
@reakaleek
Copy link
Member

Do we still need the no-semantic exporter? What's the use case for it? Can we actually clean it up?

@Mpdreamz
Copy link
Member Author

I removed it at first and then added it back again, it could be handy while more people discover this functionality.

Not sure either, added it back at least for now but happy to remove it further too.

@Mpdreamz Mpdreamz changed the title feature/index commands Specialized index command aliases with more options Sep 23, 2025
@Mpdreamz Mpdreamz enabled auto-merge (squash) September 23, 2025 20:35
@Mpdreamz Mpdreamz merged commit a6a0df6 into main Sep 23, 2025
19 checks passed
@Mpdreamz Mpdreamz deleted the feature/index-commands branch September 23, 2025 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants