# document.save

Canonical URL: https://developers.iagenify.com/ar/sdk/workflows/steps/document-save/
Language: ar

`type: "document.save"`

يكتب مستند إلى مخزن ويفهرسه، لذا بحث مدلول لاحق يمكن أن يجده بالمعنى.

Status: storage and path required · indexes it · chunks reported

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `storage` | string | مطلوب | أين يذهب. |
| `path` | string | مطلوب | اسم الوثيقة |
| `content` | any |  | محتوى النص. |
| `contentBase64` | string |  | (أ) من (أ) إلى (أ) PDF، أ DOCX. |

```javascript
{ id: "index", type: "document.save", config: {
    storage: "…", path: "digests/{{input.week}}.md",
    content: "{{steps.write.output.text}}" } }
```

## ما يضيفه المؤشر {#difference}

> **إنه يغلق حلقة لا يمكن لسلسلة أن تغلقها بمفردها**
>
> البحث الدناني فقط يجد ما تم فهرسته. بدون هذه الخطوة، يمكن لتدفق العمل أن ينتج مئات التقارير ولا يستطيع أبداً أن يجد واحداً منها بما يقول.

## المخرجات {#output}

```javascript
{{steps.index.output.document}}   // its identifier
{{steps.index.output.chunks}}     // how many pieces were indexed
{{steps.index.output.bytes}}
```

## *ووجدها مرة أخرى* {#finding}

```javascript
{ id: "recall", type: "storage.query", config: {
    storage: "…", action: "search", query: "{{input.question}}" } }
```

## التكلفة {#cost}

الـ إلى إلى مُنتقى نداء.

- [file.save](/ar/sdk/workflows/steps/file-save): الكتابة بدون فهرسة
- [storage.query](/ar/sdk/workflows/steps/storage-query): البحث عن البحث عن البحث عن البحث.
- [خطوات سير العمل](/ar/sdk/workflows/steps): الأنواع الثلاثة والعشرون.

```python
{"id": "index", "type": "document.save", "config": {
    "storage": "…", "path": "digests/{{input.week}}.md",
    "content": "{{steps.write.output.text}}"}}
```

```python
"{{steps.index.output.document}}"   # its identifier
"{{steps.index.output.chunks}}"     # how many pieces were indexed
"{{steps.index.output.bytes}}"
```

```python
{"id": "recall", "type": "storage.query", "config": {
    "storage": "…", "action": "search", "query": "{{input.question}}"}}
```
