Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: add ignore missing to text chunking processor #8266

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions _ingest-pipelines/processors/text-chunking.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@ The following is the syntax for the `text_chunking` processor:

The following table lists the required and optional parameters for the `text_chunking` processor.

| Parameter | Data type | Required/Optional | Description |
|:---|:---|:---|:---|
| `field_map` | Object | Required | Contains key-value pairs that specify the mapping of a text field to the output field. |
| `field_map.<input_field>` | String | Required | The name of the field from which to obtain text for generating chunked passages. |
| `field_map.<output_field>` | String | Required | The name of the field in which to store the chunked results. |
| `algorithm` | Object | Required | Contains at most one key-value pair that specifies the chunking algorithm and parameters. |
| `algorithm.<name>` | String | Optional | The name of the chunking algorithm. Valid values are [`fixed_token_length`](#fixed-token-length-algorithm) or [`delimiter`](#delimiter-algorithm). Default is `fixed_token_length`. |
| `algorithm.<parameters>` | Object | Optional | The parameters for the chunking algorithm. By default, contains the default parameters of the `fixed_token_length` algorithm. |
| `description` | String | Optional | A brief description of the processor. |
| `tag` | String | Optional | An identifier tag for the processor. Useful when debugging in order to distinguish between processors of the same type. |
| Parameter | Data type | Required/Optional | Description |
|:----------------------------|:----------|:---|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `field_map` | Object | Required | Contains key-value pairs that specify the mapping of a text field to the output field. |
| `field_map.<input_field>` | String | Required | The name of the field from which to obtain text for generating chunked passages. |
| `field_map.<output_field>` | String | Required | The name of the field in which to store the chunked results. |
| `algorithm` | Object | Required | Contains at most one key-value pair that specifies the chunking algorithm and parameters. |
| `algorithm.<name>` | String | Optional | The name of the chunking algorithm. Valid values are [`fixed_token_length`](#fixed-token-length-algorithm) or [`delimiter`](#delimiter-algorithm). Default is `fixed_token_length`. |
| `algorithm.<parameters>` | Object | Optional | The parameters for the chunking algorithm. By default, contains the default parameters of the `fixed_token_length` algorithm. |
| `ignore_missing` | Boolean | Optional | If `true` then empty fields will have no output. If `false` empty documents will have an empty list as output. Default is `false`. |
| `description` | String | Optional | A brief description of the processor. |
| `tag` | String | Optional | An identifier tag for the processor. Useful when debugging in order to distinguish between processors of the same type. |

To perform chunking on nested fields, specify `input_field` and `output_field` values as JSON objects. Dot paths of nested fields are not supported. For example, use `"field_map": { "foo": { "bar": "bar_chunk"} }` instead of `"field_map": { "foo.bar": "foo.bar_chunk"}`.
{: .note}
Expand Down
Loading