Skip to content

Commit

Permalink
docs: elasticsearch docs for materializing keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
williamhbaker committed Feb 20, 2024
1 parent 16abeff commit 0bb03bf
Showing 1 changed file with 37 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ To use this connector, you'll need:
If you haven't yet captured your data from its external source, start at the beginning of the [guide to create a dataflow](../../../guides/create-dataflow.md). You'll be referred back to this connector-specific documentation at the appropriate steps.
:::


## Configuration

To use this connector, begin with data in one or more Flow collections.
Expand Down Expand Up @@ -94,6 +93,43 @@ This connector supports both standard and delta updates. You must choose an opti

[Learn more about delta updates](../../../concepts/materialization.md#delta-updates) and the implications of using each update type.

## Keyword Fields

Collection fields with `type: string` will have `keyword` index mappings created for them if they
are part of the collection key, and `text` mappings for them if they are not part of the collection
key.

To materialize a collection field with `type: string` as a `keyword` mapping instead of a `text`
mapping, configure the [field selection](../../../concepts/materialization.md#projected-fields) for
the binding to indicate which fields should having keyword mappings created for them using the key
and value of `"keyword": true`. This can be changed by updating the JSON in the **Advanced
Specification Editor** in the web app or by using `flowctl` to edit the specification directly, see
[edit a materialization](../../../guides/edit-data-flows.md#edit-a-materialization) for more details.

An example JSON configuration for a binding that materializes `stringField` as a `keyword` mapping
is shown below:

```json
{
"bindings": [
{
"resource": {
"index": "my-elasticsearch-index",
},
"source": "PREFIX/source_collection",
"fields": {
"include": {
"stringField": {
"keyword": true
}
},
"recommended": true
}
}
]
}
```

## Changelog

The changelog includes a list of breaking changes made to this connector. Backwards-compatible changes are not listed.
Expand Down

0 comments on commit 0bb03bf

Please sign in to comment.