#!/usr/bin/env bash # Processes a the file from local, chunks, embeds, and writes the results to an Elasticsearch index. # Structured outputs are stored in local-to-elasticsearch/ SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) cd "$SCRIPT_DIR"/../../.. || exit 1 # As an example we're using the local connector, # however ingesting from any supported source connector is possible. # shellcheck disable=2094 PYTHONPATH=. ./unstructured/ingest/main.py \ local \ --input-path example-docs/book-war-and-peace-1225p.txt \ --output-dir local-to-elasticsearch \ --strategy fast \ --chunk-elements \ --embedding-provider "" \ --num-processes 2 \ --verbose \ --work-dir "" \ elasticsearch \ --hosts "" \ --index-name "" \ --username "" \ --password "" \ --batch-size-bytes "" \ --num-processes "" \ --cloud-id "" \ --es-api-key "" \ --api-key-id "" \ --bearer-auth "" \ --ca-certs "" \ --ssl-assert-fingerprint ""