You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/core/flow_methods.mdx
+26-8Lines changed: 26 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,9 +108,9 @@ If you want to remove the flow from the current process, you can call `demo_flow
108
108
109
109
:::
110
110
111
-
## Build / update target data
111
+
## Build/update target data
112
112
113
-
The major goal of a flow is to perform the transformations on source data and build / update data in the target.
113
+
The major goal of a flow is to perform the transformations on source data and build/update data in the target.
114
114
This action has two modes:
115
115
116
116
***One time update.**
@@ -119,7 +119,7 @@ This action has two modes:
119
119
It fits into situations that you need to access the fresh target data at certain time points.
120
120
121
121
***Live update.**
122
-
It continuously captures changes from the source data and updates the target data accordingly.
122
+
During live update, a one time update is performed first, then it continuously captures changes from the source data and updates the target data accordingly.
123
123
It's long-running and only stops when being aborted explicitly.
124
124
It fits into situations that you need to access the fresh target data continuously in most of the time.
125
125
@@ -131,6 +131,12 @@ This is to achieve best efficiency.
131
131
132
132
:::
133
133
134
+
Besides major update modes, CocoIndex also support the following options:
135
+
136
+
***Reexport targets**.
137
+
When this is enabled, even if both of the source data and flow definition are not changed, CocoIndex will still reprocess and reexport the targets.
138
+
It's helpful when you want to reload the target data, e.g. after some data loss.
139
+
Note that when this is enabled on live update mode, reexport only happens for the initial one time update.
134
140
135
141
### One time update
136
142
@@ -150,6 +156,12 @@ With a `--setup` option, it will also setup the flow first if needed.
150
156
cocoindex update --setup main.py
151
157
```
152
158
159
+
With a `--reexport` option, it will reexport the targets even if there's no change.
160
+
161
+
```sh
162
+
cocoindex update --reexport main.py
163
+
```
164
+
153
165
#### Library API
154
166
155
167
<Tabs>
@@ -179,6 +191,14 @@ It's quite cheap to do so, as CocoIndex will automatically combine multiple call
179
191
180
192
:::
181
193
194
+
Both `update()` and `update_async()` can take a `reexport_targets` option to enable reexporting the targets even if there's no change.
0 commit comments