mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-19 07:15:23 +00:00
gcloud: Thu Mar 26 12:11:21 UTC 2026
This commit is contained in:
parent
c0febd2be1
commit
89a3bc9276
1093 changed files with 69108 additions and 2686 deletions
|
|
@ -17,7 +17,9 @@ SYNOPSIS
|
|||
[--output-data-fields=[DATA_OUTPUT_FIELD,...]
|
||||
--output-metadata-fields=[METADATA_OUTPUT_FIELD,...]
|
||||
--output-vector-fields=[VECTOR_OUTPUT_FIELD,...]]
|
||||
[--use-index=USE_INDEX | --use-knn] [GCLOUD_WIDE_FLAG ...]
|
||||
[--use-knn | [--use-index=INDEX_NAME
|
||||
: --dense-scann-initial-candidate-count=CANDIDATE_COUNT
|
||||
--dense-scann-search-leaves-pct=PERCENTAGE]] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) Search data objects from a Vector Search collection.
|
||||
|
|
@ -31,6 +33,33 @@ EXAMPLES
|
|||
--text-search-text="test" \
|
||||
--text-search-data-fields="text_field" --top-k=10
|
||||
|
||||
To search data objects from collection my-collection in location
|
||||
us-central1 using semantic search and return 5 results, run:
|
||||
|
||||
$ gcloud beta vector-search collections data-objects search \
|
||||
--collection=my-collection --location=us-central1 \
|
||||
--semantic-search-text="sci-fi" \
|
||||
--semantic-search-field="plot_embedding" \
|
||||
--semantic-task-type="retrieval-query" --top-k=5
|
||||
|
||||
To search data objects from collection my-collection in location
|
||||
us-central1 using vector search with an index hint and return 7 results,
|
||||
run:
|
||||
|
||||
$ gcloud beta vector-search collections data-objects search \
|
||||
--collection=my-collection --location=us-central1 \
|
||||
--vector-search-field="genre_embedding" \
|
||||
--vector-from-file="vector.json" --use-index="my-index" \
|
||||
--top-k=7
|
||||
|
||||
To search data objects from collection my-collection in location
|
||||
us-central1 using vector search with KNN for exact results, run:
|
||||
|
||||
$ gcloud beta vector-search collections data-objects search \
|
||||
--collection=my-collection --location=us-central1 \
|
||||
--vector-search-field="genre_embedding" \
|
||||
--vector-from-file="vector.json" --use-knn --top-k=7
|
||||
|
||||
REQUIRED FLAGS
|
||||
--collection=COLLECTION
|
||||
The collection to search data objects from.
|
||||
|
|
@ -102,6 +131,12 @@ REQUIRED FLAGS
|
|||
--vector-from-file=VECTOR_FROM_FILE
|
||||
Path to a JSON file containing dense or sparse vector to search with.
|
||||
|
||||
Example file content for dense vector: { "dense": { "values": [ 0.7,
|
||||
0.6, 0.5, 0.4 ] } }
|
||||
|
||||
Example file content for sparse vector: { "sparse": { "indices": [1,
|
||||
5, 10], "values": [0.1, 0.5, 0.21] } }
|
||||
|
||||
This flag argument must be specified if any of the other arguments in
|
||||
this group are specified.
|
||||
|
||||
|
|
@ -147,17 +182,32 @@ OPTIONAL FLAGS
|
|||
|
||||
At most one of these can be specified:
|
||||
|
||||
--use-index=USE_INDEX
|
||||
The resource name of the index to use for the search.
|
||||
|
||||
This flag is compatible only with Semantic Search and Vector Search.
|
||||
|
||||
--use-knn
|
||||
If set to true, the search will use the system's default K-Nearest
|
||||
Neighbor (KNN) index engine.
|
||||
|
||||
This flag is compatible only with Semantic Search and Vector Search.
|
||||
|
||||
Or at least one of these can be specified:
|
||||
|
||||
Use Index Options
|
||||
|
||||
--use-index=INDEX_NAME
|
||||
The resource name of the index to use for the search.
|
||||
|
||||
This flag is compatible only with Semantic Search and Vector
|
||||
Search.
|
||||
|
||||
This flag argument must be specified if any of the other arguments
|
||||
in this group are specified.
|
||||
|
||||
--dense-scann-initial-candidate-count=CANDIDATE_COUNT
|
||||
The number of initial candidates for dense ScaNN.
|
||||
|
||||
--dense-scann-search-leaves-pct=PERCENTAGE
|
||||
The percentage of leaves to search for dense ScaNN, in the range
|
||||
[0, 100].
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
|
|
@ -167,5 +217,8 @@ GCLOUD WIDE FLAGS
|
|||
Run $ gcloud help for details.
|
||||
|
||||
NOTES
|
||||
This command is currently in beta and might change without notice.
|
||||
This command is currently in beta and might change without notice. This
|
||||
variant is also available:
|
||||
|
||||
$ gcloud vector-search collections data-objects search
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue