Skip to content

Commit 157679c

Browse files
authored
[DOCS] resource_name property for attachment ingest processor (#65974)
1 parent 149f1f9 commit 157679c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/plugins/ingest-attachment.asciidoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ include::install_remove.asciidoc[]
2828
| `indexed_chars_field` | no | `null` | Field name from which you can overwrite the number of chars being used for extraction. See `indexed_chars`.
2929
| `properties` | no | all properties | Array of properties to select to be stored. Can be `content`, `title`, `name`, `author`, `keywords`, `date`, `content_type`, `content_length`, `language`
3030
| `ignore_missing` | no | `false` | If `true` and `field` does not exist, the processor quietly exits without modifying the document
31+
| `resource_name` | no | | Field containing the name of the resource to decode. If specified, the processor passes this resource name to the underlying Tika library to enable https://tika.apache.org/1.24.1/detection.html#Resource_Name_Based_Detection[Resource Name Based Detection].
3132
|======
3233

3334
[discrete]
@@ -114,7 +115,7 @@ PUT _ingest/pipeline/attachment
114115
NOTE: Extracting contents from binary data is a resource intensive operation and
115116
consumes a lot of resources. It is highly recommended to run pipelines
116117
using this processor in a dedicated ingest node.
117-
118+
118119
[[ingest-attachment-cbor]]
119120
==== Use the attachment processor with CBOR
120121

@@ -156,17 +157,17 @@ with open(file, 'rb') as f:
156157
'data': f.read()
157158
}
158159
requests.put(
159-
'http://localhost:9200/my-index-000001/_doc/my_id?pipeline=cbor-attachment',
160-
data=cbor2.dumps(doc),
160+
'http://localhost:9200/my-index-000001/_doc/my_id?pipeline=cbor-attachment',
161+
data=cbor2.dumps(doc),
161162
headers=headers
162163
)
163164
----
164165

165166
[[ingest-attachment-extracted-chars]]
166167
==== Limit the number of extracted chars
167168

168-
To prevent extracting too many chars and overload the node memory, the number of chars being used for extraction
169-
is limited by default to `100000`. You can change this value by setting `indexed_chars`. Use `-1` for no limit but
169+
To prevent extracting too many chars and overload the node memory, the number of chars being used for extraction
170+
is limited by default to `100000`. You can change this value by setting `indexed_chars`. Use `-1` for no limit but
170171
ensure when setting this that your node will have enough HEAP to extract the content of very big documents.
171172

172173
You can also define this limit per document by extracting from a given field the limit to set. If the document

0 commit comments

Comments
 (0)