Portal Community

When to Use

Dynamic mapping fallback: If you index a document into a non-existent index using document/create, Elasticsearch creates the index automatically with dynamic mapping. Use index/create first whenever field type control matters — particularly for fields used in aggregations, sorting, or exact-match queries, which require keyword mapping rather than text.

Configuration

Connection

FieldRequiredDescription
HostRequiredElasticsearch cluster URL, e.g. https://localhost:9200.
UsernameOptionalElasticsearch username (required if security is enabled).
PasswordOptionalPassword for the specified username.
IgnoreSSLOptionalDefault false. Skip TLS validation. Development use only.

Operation

FieldRequiredDescription
IndexNameRequiredName for the new index. Must be lowercase with no spaces. Supports BizFirst expressions for dynamic names, e.g. app-logs-{{ $now | date('YYYY-MM') }}.
MappingsOptionalElasticsearch mappings object defining field types and configurations. Entered as JSON in the code editor. If omitted, Elasticsearch uses dynamic mapping for all fields.
SettingsOptionalElasticsearch index settings object — shard count, replica count, custom analyzers, refresh interval, etc. Entered as JSON. If omitted, Elasticsearch cluster defaults apply.

Validation Errors

Error CodeCause
VAL_MISSING_INDEX_NAMEIndexName is empty.

Output

Success Port

FieldTypeDescription
statusstring"success"
indexNamestringThe name of the newly created index.
createdbooleantrue when the index was created successfully.

Error Port

Fires if the index already exists (400 resource_already_exists_exception), authentication fails, or a settings/mappings validation error occurs. The error output contains errorCode and message fields.

Index already exists: If the index already exists, the operation fails and routes to the error port. Use index/get before this node to check existence, or handle the error port to treat "already exists" as acceptable in idempotent provisioning workflows.

Examples

Product Catalogue Index with Explicit Mappings

{
  "resource": "index",
  "operation": "create",
  "IndexName": "products",
  "Mappings": {
    "properties": {
      "title":       { "type": "text", "analyzer": "english" },
      "sku":         { "type": "keyword" },
      "category":    { "type": "keyword" },
      "brand":       { "type": "keyword" },
      "price":       { "type": "float" },
      "in_stock":    { "type": "boolean" },
      "indexed_at":  { "type": "date" },
      "tags":        { "type": "keyword" }
    }
  },
  "Settings": {
    "number_of_shards": 2,
    "number_of_replicas": 1
  }
}

sku, category, and brand use keyword so they support exact-match filters and aggregations. title uses the English analyzer for stemmed full-text search.

Time-Series Log Index — Dynamic Name

{
  "resource": "index",
  "operation": "create",
  "IndexName": "app-logs-{{ $now | date('YYYY-MM') }}",
  "Mappings": {
    "properties": {
      "timestamp":  { "type": "date" },
      "level":      { "type": "keyword" },
      "service":    { "type": "keyword" },
      "message":    { "type": "text" },
      "traceId":    { "type": "keyword" }
    }
  },
  "Settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0,
    "refresh_interval": "5s"
  }
}

Run this via a scheduled workflow at the start of each month. The refresh_interval of 5s reduces indexing overhead for high-volume log ingestion.

Index with Custom Analyzer

{
  "resource": "index",
  "operation": "create",
  "IndexName": "articles",
  "Settings": {
    "analysis": {
      "analyzer": {
        "autocomplete": {
          "tokenizer": "autocomplete_tokenizer",
          "filter": ["lowercase"]
        }
      },
      "tokenizer": {
        "autocomplete_tokenizer": {
          "type": "edge_ngram",
          "min_gram": 2,
          "max_gram": 20,
          "token_chars": ["letter", "digit"]
        }
      }
    }
  },
  "Mappings": {
    "properties": {
      "title": {
        "type": "text",
        "analyzer": "autocomplete",
        "search_analyzer": "standard"
      }
    }
  }
}

Configures an edge n-gram tokenizer for autocomplete search on the title field. The search_analyzer uses standard so query terms are not n-grammed on the query side.