Skip to content

Commit e7208e6

Browse files
OxyjunRebeccaTamachiro
authored andcommitted
[Vectorize] Moving Vectorize Wrangler commands into a partial (#21711)
* Moving Vectorize Wrangler commands into a partial. * Updating links
1 parent b7fe228 commit e7208e6

File tree

6 files changed

+202
-221
lines changed

6 files changed

+202
-221
lines changed

src/content/docs/learning-paths/workers/get-started/c3-and-wrangler.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ You will use C3 for new project creation.
2929

3030
[Wrangler](/workers/wrangler/) is a command-line tool for building with Cloudflare developer products.
3131

32-
With Wrangler, you can [develop](/workers/wrangler/commands/#dev) your Worker locally and remotely, [roll back](/workers/wrangler/commands/#rollback) to a previous deployment of your Worker, [delete](/workers/wrangler/commands/#delete-1) a Worker and its bound Developer Platform resources, and more. Refer to [Wrangler Commands](/workers/wrangler/commands/) to view the full reference of Wrangler commands.
32+
With Wrangler, you can [develop](/workers/wrangler/commands/#dev) your Worker locally and remotely, [roll back](/workers/wrangler/commands/#rollback) to a previous deployment of your Worker, [delete](/workers/wrangler/commands/#delete) a Worker and its bound Developer Platform resources, and more. Refer to [Wrangler Commands](/workers/wrangler/commands/) to view the full reference of Wrangler commands.
3333

3434
When you run C3 to create your project, C3 will install the latest version of Wrangler and you do not need to install Wrangler again. You can [update Wrangler](/workers/wrangler/install-and-update/#update-wrangler) to a newer version in your project to access new Wrangler capabilities and features.
3535

src/content/docs/workers/configuration/secrets.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ To add a secret via the dashboard:
5959

6060
#### Via Wrangler
6161

62-
Secrets can be deleted through [`wrangler secret delete`](/workers/wrangler/commands/#delete-2) or [`wrangler versions secret delete`](/workers/wrangler/commands/#secret-delete) commands.
62+
Secrets can be deleted through [`wrangler secret delete`](/workers/wrangler/commands/#delete-1) or [`wrangler versions secret delete`](/workers/wrangler/commands/#secret-delete) commands.
6363

6464
`wrangler secret delete` creates a new version of the Worker and deploys it immediately.
6565

src/content/docs/workers/configuration/versions-and-deployments/gradual-deployments.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ curl -s https://example.com -H 'Cloudflare-Workers-Version-Overrides: my-worker-
157157

158158
The dictionary can contain multiple key-value pairs. Each key indicates the name of the Worker the override should be applied to. The value indicates the version ID that should be used and must be a [String](https://www.rfc-editor.org/rfc/rfc8941#name-strings).
159159

160-
A version override will only be applied if the specified version is in the current deployment. The versions in the current deployment can be found using the [`wrangler deployments list`](/workers/wrangler/commands/#list-5) command or on the [Workers Dashboard](https://dash.cloudflare.com/?to=/:account/workers) under Worker > Deployments > Active Deployment.
160+
A version override will only be applied if the specified version is in the current deployment. The versions in the current deployment can be found using the [`wrangler deployments list`](/workers/wrangler/commands/#list-6) command or on the [Workers Dashboard](https://dash.cloudflare.com/?to=/:account/workers) under Worker > Deployments > Active Deployment.
161161

162162
:::note[Verifying that the version override was applied]
163163

src/content/docs/workers/configuration/versions-and-deployments/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ New versions are not created when you make changes to [resources connected to yo
7373

7474
#### Via Wrangler
7575

76-
Wrangler allows you to view the 10 most recent versions and deployments. Refer to the [`versions list`](/workers/wrangler/commands/#list-4) and [`deployments`](/workers/wrangler/commands/#list-5) documentation to view the commands.
76+
Wrangler allows you to view the 10 most recent versions and deployments. Refer to the [`versions list`](/workers/wrangler/commands/#list-5) and [`deployments`](/workers/wrangler/commands/#list-6) documentation to view the commands.
7777

7878
#### Via the Cloudflare dashboard
7979

src/content/docs/workers/wrangler/commands.mdx

Lines changed: 2 additions & 217 deletions
Original file line numberDiff line numberDiff line change
@@ -181,222 +181,7 @@ Manage [Hyperdrive](/hyperdrive/) database configurations.
181181

182182
Interact with a [Vectorize](/vectorize/) vector database.
183183

184-
### `create`
185-
186-
Creates a new vector index, and provides the binding and name that you will put in your Wrangler file.
187-
188-
```sh
189-
npx wrangler vectorize create <INDEX_NAME> [--dimensions=<NUM_DIMENSIONS>] [--metric=<DISTANCE_METRIC>] [--description=<DESCRIPTION>]
190-
```
191-
192-
- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
193-
- The name of the new index to create. Must be unique for an account and cannot be changed after creation.
194-
- `--dimensions` <Type text="number" /> <MetaInfo text="required" />
195-
- The vector dimension width to configure the index for. Cannot be changed after creation.
196-
- `--metric` <Type text="string" /> <MetaInfo text="required" />
197-
- The distance metric to use for calculating vector distance. Must be one of `cosine`, `euclidean`, or `dot-product`.
198-
- `--description` <Type text="string" /> <MetaInfo text="optional" />
199-
- A description for your index.
200-
- `--deprecated-v1` <Type text="boolean" /> <MetaInfo text="optional" />
201-
- Create a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy).
202-
203-
<Render file="wrangler-commands/global-flags" product="workers" />
204-
205-
### `list`
206-
207-
List all Vectorize indexes in your account, including the configured dimensions and distance metric.
208-
209-
```sh
210-
npx wrangler vectorize list
211-
```
212-
213-
- `--deprecated-v1` <Type text="boolean" /> <MetaInfo text="optional" />
214-
- List legacy Vectorize indexes. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy).
215-
216-
<Render file="wrangler-commands/global-flags" product="workers" />
217-
218-
### `get`
219-
220-
Get details about an individual index, including its configuration.
221-
222-
```sh
223-
npx wrangler vectorize get <INDEX_NAME>
224-
```
225-
226-
- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
227-
- The name of the index to fetch details for.
228-
- `--deprecated-v1` <Type text="boolean" /> <MetaInfo text="optional" />
229-
- Get a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy).
230-
231-
<Render file="wrangler-commands/global-flags" product="workers" />
232-
233-
### `info`
234-
235-
Get some additional information about an individual index, including the vector count and details about the last processed mutation.
236-
237-
```sh
238-
npx wrangler vectorize info <INDEX_NAME>
239-
```
240-
241-
- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
242-
- The name of the index to fetch details for.
243-
244-
<Render file="wrangler-commands/global-flags" product="workers" />
245-
246-
### `delete`
247-
248-
Delete a Vectorize index.
249-
250-
```sh
251-
npx wrangler vectorize delete <INDEX_NAME> [OPTIONS]
252-
```
253-
254-
- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
255-
- The name of the Vectorize index to delete.
256-
- `--force` <Type text="boolean" /> <MetaInfo text="optional" />
257-
- Skip confirmation when deleting the index (Note: This is not a recoverable operation).
258-
- `--deprecated-v1` <Type text="boolean" /> <MetaInfo text="optional" />
259-
- Delete a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy).
260-
261-
<Render file="wrangler-commands/global-flags" product="workers" />
262-
263-
### `insert`
264-
265-
Insert vectors into an index.
266-
267-
```sh
268-
npx wrangler vectorize insert <INDEX_NAME> [OPTIONS]
269-
```
270-
271-
- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
272-
- The name of the Vectorize index to upsert vectors in.
273-
- `--file` <Type text="string" /> <MetaInfo text="required" />
274-
- A file containing the vectors to insert in newline-delimited JSON (JSON) format.
275-
- `--batch-size` <Type text="number" /> <MetaInfo text="optional" />
276-
- The number of vectors to insert at a time (default: `1000`).
277-
- `--deprecated-v1` <Type text="boolean" /> <MetaInfo text="optional" />
278-
- Insert into a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy).
279-
280-
<Render file="wrangler-commands/global-flags" product="workers" />
281-
282-
### `upsert`
283-
284-
Upsert vectors into an index. Existing vectors in the index would be overwritten.
285-
286-
```sh
287-
npx wrangler vectorize upsert <INDEX_NAME> [OPTIONS]
288-
```
289-
290-
- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
291-
- The name of the Vectorize index to upsert vectors in.
292-
- `--file` <Type text="string" /> <MetaInfo text="required" />
293-
- A file containing the vectors to insert in newline-delimited JSON (JSON) format.
294-
- `--batch-size` <Type text="number" /> <MetaInfo text="optional" />
295-
- The number of vectors to insert at a time (default: `5000`).
296-
297-
<Render file="wrangler-commands/global-flags" product="workers" />
298-
299-
### `query`
300-
301-
Query a Vectorize index for similar vectors.
302-
303-
```sh
304-
npx wrangler vectorize query <INDEX_NAME> [OPTIONS]
305-
```
306-
307-
- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
308-
- The name of the Vectorize index to query.
309-
- `--vector` <Type text="array" /> <MetaInfo text="optional" />
310-
- Vector against which the Vectorize index is queried. Either this or the `vector-id` param must be provided.
311-
- `--vector-id` <Type text="string" /> <MetaInfo text="optional" />
312-
- Identifier for a vector that is already present in the index against which the index is queried. Either this or the `vector` param must be provided.
313-
- `--top-k` <Type text="number" /> <MetaInfo text="optional" />
314-
- The number of vectors to query (default: `5`).
315-
- `--return-values` <Type text="boolean" /> <MetaInfo text="optional" />
316-
- Enable to return vector values in the response (default: `false`).
317-
- `--return-metadata` <Type text="string" /> <MetaInfo text="optional" />
318-
- Enable to return vector metadata in the response. Must be one of `none`, `indexed`, or `all` (default: `none`).
319-
- `--namespace` <Type text="string" /> <MetaInfo text="optional" />
320-
- Query response to only include vectors from this namespace.
321-
- `--filter` <Type text="string" /> <MetaInfo text="optional" />
322-
- Filter vectors based on this metadata filter. Example: `'{ 'p1': 'abc', 'p2': { '$ne': true }, 'p3': 10, 'p4': false, 'nested.p5': 'abcd' }'`
323-
324-
<Render file="wrangler-commands/global-flags" product="workers" />
325-
326-
### `get-vectors`
327-
328-
Fetch vectors from a Vectorize index using the provided ids.
329-
330-
```sh
331-
npx wrangler vectorize get-vectors <INDEX_NAME> [OPTIONS]
332-
```
333-
334-
- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
335-
- The name of the Vectorize index from which vectors need to be fetched.
336-
- `--ids` <Type text="array" /> <MetaInfo text="required" />
337-
- List of ids for which vectors must be fetched.
338-
339-
<Render file="wrangler-commands/global-flags" product="workers" />
340-
341-
### `delete-vectors`
342-
343-
Delete vectors in a Vectorize index using the provided ids.
344-
345-
```sh
346-
npx wrangler vectorize delete-vectors <INDEX_NAME> [OPTIONS]
347-
```
348-
349-
- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
350-
- The name of the Vectorize index from which vectors need to be deleted.
351-
- `--ids` <Type text="array" /> <MetaInfo text="required" />
352-
- List of ids corresponding to the vectors that must be deleted.
353-
354-
<Render file="wrangler-commands/global-flags" product="workers" />
355-
356-
### `create-metadata-index`
357-
358-
Enable metadata filtering on the specified property.
359-
360-
```sh
361-
npx wrangler vectorize create-metadata-index <INDEX_NAME> [OPTIONS]
362-
```
363-
364-
- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
365-
- The name of the Vectorize index for which metadata index needs to be created.
366-
- `--property-name` <Type text="string" /> <MetaInfo text="required" />
367-
- Metadata property for which metadata filtering should be enabled.
368-
- `--type` <Type text="string" /> <MetaInfo text="required" />
369-
- Data type of the property. Must be one of `string`, `number`, or `boolean`.
370-
371-
<Render file="wrangler-commands/global-flags" product="workers" />
372-
373-
### `list-metadata-index`
374-
375-
List metadata properties on which metadata filtering is enabled.
376-
377-
```sh
378-
npx wrangler vectorize list-metadata-index <INDEX_NAME> [OPTIONS]
379-
```
380-
381-
- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
382-
- The name of the Vectorize index for which metadata indexes needs to be fetched.
383-
384-
<Render file="wrangler-commands/global-flags" product="workers" />
385-
386-
### `delete-metadata-index`
387-
388-
Disable metadata filtering on the specified property.
389-
390-
```sh
391-
npx wrangler vectorize delete-metadata-index <INDEX_NAME> [OPTIONS]
392-
```
393-
394-
- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
395-
- The name of the Vectorize index for which metadata index needs to be disabled.
396-
- `--property-name` <Type text="string" /> <MetaInfo text="required" />
397-
- Metadata property for which metadata filtering should be disabled.
398-
399-
<Render file="wrangler-commands/global-flags" product="workers" />
184+
<Render file="wrangler-commands/vectorize" product="workers" />
400185

401186
---
402187

@@ -762,7 +547,7 @@ wrangler secrets-store store create default --remote
762547
✅ Created store! (Name: default, ID: 2e2a82d317134506b58defbe16982d54)
763548
```
764549

765-
### delete
550+
### delete
766551

767552
Delete a store within Secrets Store.
768553

0 commit comments

Comments
 (0)