Documentation
¶
Overview ¶
These APIs allow you to manage Vector Search Endpoints, Vector Search Indexes, etc.
Index ¶
- type ColumnInfo
- type CreateEndpoint
- type CreateVectorIndexRequest
- type CustomTag
- type DeleteDataResult
- type DeleteDataStatus
- type DeleteDataVectorIndexRequest
- type DeleteDataVectorIndexResponse
- type DeleteEndpointRequest
- type DeleteIndexRequest
- type DeltaSyncVectorIndexSpecRequest
- type DeltaSyncVectorIndexSpecResponse
- type DirectAccessVectorIndexSpec
- type EmbeddingSourceColumn
- type EmbeddingVectorColumn
- type EndpointInfo
- type EndpointStatus
- type EndpointStatusState
- type EndpointType
- type GetEndpointRequest
- type GetIndexRequest
- type ListEndpointResponse
- type ListEndpointsRequest
- type ListIndexesRequest
- type ListValue
- type ListVectorIndexesResponse
- type MapStringValueEntry
- type Metric
- type MetricLabel
- type MetricValue
- type MetricValues
- type MiniVectorIndex
- type PatchEndpointBudgetPolicyRequest
- type PatchEndpointBudgetPolicyResponse
- type PipelineType
- type QueryVectorIndexNextPageRequest
- type QueryVectorIndexRequest
- type QueryVectorIndexResponse
- type RerankerConfig
- type RerankerConfigRerankerParameters
- type ResultData
- type ResultManifest
- type RetrieveUserVisibleMetricsRequest
- type RetrieveUserVisibleMetricsResponse
- type ScanVectorIndexRequest
- type ScanVectorIndexResponse
- type Struct
- type SyncIndexRequest
- type UpdateEndpointCustomTagsRequest
- type UpdateEndpointCustomTagsResponse
- type UpsertDataResult
- type UpsertDataStatus
- type UpsertDataVectorIndexRequest
- type UpsertDataVectorIndexResponse
- type Value
- type VectorIndex
- type VectorIndexStatus
- type VectorIndexType
- type VectorSearchEndpointsAPI
- func (a *VectorSearchEndpointsAPI) CreateEndpoint(ctx context.Context, createEndpoint CreateEndpoint) (*WaitGetEndpointVectorSearchEndpointOnline[EndpointInfo], error)
- func (a *VectorSearchEndpointsAPI) CreateEndpointAndWait(ctx context.Context, createEndpoint CreateEndpoint, ...) (*EndpointInfo, error)deprecated
- func (a *VectorSearchEndpointsAPI) DeleteEndpoint(ctx context.Context, request DeleteEndpointRequest) error
- func (a *VectorSearchEndpointsAPI) DeleteEndpointByEndpointName(ctx context.Context, endpointName string) error
- func (a *VectorSearchEndpointsAPI) GetEndpoint(ctx context.Context, request GetEndpointRequest) (*EndpointInfo, error)
- func (a *VectorSearchEndpointsAPI) GetEndpointByEndpointName(ctx context.Context, endpointName string) (*EndpointInfo, error)
- func (a *VectorSearchEndpointsAPI) ListEndpoints(ctx context.Context, request ListEndpointsRequest) listing.Iterator[EndpointInfo]
- func (a *VectorSearchEndpointsAPI) ListEndpointsAll(ctx context.Context, request ListEndpointsRequest) ([]EndpointInfo, error)
- func (a *VectorSearchEndpointsAPI) RetrieveUserVisibleMetrics(ctx context.Context, request RetrieveUserVisibleMetricsRequest) (*RetrieveUserVisibleMetricsResponse, error)
- func (a *VectorSearchEndpointsAPI) UpdateEndpointBudgetPolicy(ctx context.Context, request PatchEndpointBudgetPolicyRequest) (*PatchEndpointBudgetPolicyResponse, error)
- func (a *VectorSearchEndpointsAPI) UpdateEndpointCustomTags(ctx context.Context, request UpdateEndpointCustomTagsRequest) (*UpdateEndpointCustomTagsResponse, error)
- func (a *VectorSearchEndpointsAPI) WaitGetEndpointVectorSearchEndpointOnline(ctx context.Context, endpointName string, timeout time.Duration, ...) (*EndpointInfo, error)
- type VectorSearchEndpointsInterface
- type VectorSearchEndpointsServicedeprecated
- type VectorSearchIndexesAPI
- func (a *VectorSearchIndexesAPI) CreateIndex(ctx context.Context, request CreateVectorIndexRequest) (*VectorIndex, error)
- func (a *VectorSearchIndexesAPI) DeleteDataVectorIndex(ctx context.Context, request DeleteDataVectorIndexRequest) (*DeleteDataVectorIndexResponse, error)
- func (a *VectorSearchIndexesAPI) DeleteDataVectorIndexByIndexName(ctx context.Context, indexName string) (*DeleteDataVectorIndexResponse, error)
- func (a *VectorSearchIndexesAPI) DeleteIndex(ctx context.Context, request DeleteIndexRequest) error
- func (a *VectorSearchIndexesAPI) DeleteIndexByIndexName(ctx context.Context, indexName string) error
- func (a *VectorSearchIndexesAPI) GetIndex(ctx context.Context, request GetIndexRequest) (*VectorIndex, error)
- func (a *VectorSearchIndexesAPI) GetIndexByIndexName(ctx context.Context, indexName string) (*VectorIndex, error)
- func (a *VectorSearchIndexesAPI) ListIndexes(ctx context.Context, request ListIndexesRequest) listing.Iterator[MiniVectorIndex]
- func (a *VectorSearchIndexesAPI) ListIndexesAll(ctx context.Context, request ListIndexesRequest) ([]MiniVectorIndex, error)
- func (a *VectorSearchIndexesAPI) QueryIndex(ctx context.Context, request QueryVectorIndexRequest) (*QueryVectorIndexResponse, error)
- func (a *VectorSearchIndexesAPI) QueryNextPage(ctx context.Context, request QueryVectorIndexNextPageRequest) (*QueryVectorIndexResponse, error)
- func (a *VectorSearchIndexesAPI) ScanIndex(ctx context.Context, request ScanVectorIndexRequest) (*ScanVectorIndexResponse, error)
- func (a *VectorSearchIndexesAPI) SyncIndex(ctx context.Context, request SyncIndexRequest) error
- func (a *VectorSearchIndexesAPI) UpsertDataVectorIndex(ctx context.Context, request UpsertDataVectorIndexRequest) (*UpsertDataVectorIndexResponse, error)
- type VectorSearchIndexesInterface
- type VectorSearchIndexesServicedeprecated
- type WaitGetEndpointVectorSearchEndpointOnline
- func (w *WaitGetEndpointVectorSearchEndpointOnline[R]) Get() (*EndpointInfo, error)
- func (w *WaitGetEndpointVectorSearchEndpointOnline[R]) GetWithTimeout(timeout time.Duration) (*EndpointInfo, error)
- func (w *WaitGetEndpointVectorSearchEndpointOnline[R]) OnProgress(callback func(*EndpointInfo)) *WaitGetEndpointVectorSearchEndpointOnline[R]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnInfo ¶
type ColumnInfo struct {
// Name of the column.
Name string `json:"name,omitempty"`
// Data type of the column (e.g., "string", "int", "array<float>")
TypeText string `json:"type_text,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ColumnInfo) MarshalJSON ¶
func (s ColumnInfo) MarshalJSON() ([]byte, error)
func (*ColumnInfo) UnmarshalJSON ¶
func (s *ColumnInfo) UnmarshalJSON(b []byte) error
type CreateEndpoint ¶
type CreateEndpoint struct {
// The budget policy id to be applied
BudgetPolicyId string `json:"budget_policy_id,omitempty"`
// Type of endpoint
EndpointType EndpointType `json:"endpoint_type"`
// Name of the vector search endpoint
Name string `json:"name"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateEndpoint) MarshalJSON ¶ added in v0.64.0
func (s CreateEndpoint) MarshalJSON() ([]byte, error)
func (*CreateEndpoint) UnmarshalJSON ¶ added in v0.64.0
func (s *CreateEndpoint) UnmarshalJSON(b []byte) error
type CreateVectorIndexRequest ¶
type CreateVectorIndexRequest struct {
// Specification for Delta Sync Index. Required if `index_type` is
// `DELTA_SYNC`.
DeltaSyncIndexSpec *DeltaSyncVectorIndexSpecRequest `json:"delta_sync_index_spec,omitempty"`
// Specification for Direct Vector Access Index. Required if `index_type` is
// `DIRECT_ACCESS`.
DirectAccessIndexSpec *DirectAccessVectorIndexSpec `json:"direct_access_index_spec,omitempty"`
// Name of the endpoint to be used for serving the index
EndpointName string `json:"endpoint_name"`
IndexType VectorIndexType `json:"index_type"`
// Name of the index
Name string `json:"name"`
// Primary key of the index
PrimaryKey string `json:"primary_key"`
}
type CustomTag ¶ added in v0.64.0
type CustomTag struct {
// Key field for a vector search endpoint tag.
Key string `json:"key"`
// [Optional] Value field for a vector search endpoint tag.
Value string `json:"value,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CustomTag) MarshalJSON ¶ added in v0.64.0
func (*CustomTag) UnmarshalJSON ¶ added in v0.64.0
type DeleteDataResult ¶
type DeleteDataResult struct {
// List of primary keys for rows that failed to process.
FailedPrimaryKeys []string `json:"failed_primary_keys,omitempty"`
// Count of successfully processed rows.
SuccessRowCount int64 `json:"success_row_count,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DeleteDataResult) MarshalJSON ¶
func (s DeleteDataResult) MarshalJSON() ([]byte, error)
func (*DeleteDataResult) UnmarshalJSON ¶
func (s *DeleteDataResult) UnmarshalJSON(b []byte) error
type DeleteDataStatus ¶
type DeleteDataStatus string
const DeleteDataStatusFailure DeleteDataStatus = `FAILURE`
const DeleteDataStatusPartialSuccess DeleteDataStatus = `PARTIAL_SUCCESS`
const DeleteDataStatusSuccess DeleteDataStatus = `SUCCESS`
func (*DeleteDataStatus) Set ¶
func (f *DeleteDataStatus) Set(v string) error
Set raw string value and validate it against allowed values
func (*DeleteDataStatus) String ¶
func (f *DeleteDataStatus) String() string
String representation for fmt.Print
func (*DeleteDataStatus) Type ¶
func (f *DeleteDataStatus) Type() string
Type always returns DeleteDataStatus to satisfy [pflag.Value] interface
func (*DeleteDataStatus) Values ¶ added in v0.72.0
func (f *DeleteDataStatus) Values() []DeleteDataStatus
Values returns all possible values for DeleteDataStatus.
There is no guarantee on the order of the values in the slice.
type DeleteDataVectorIndexResponse ¶
type DeleteDataVectorIndexResponse struct {
// Result of the upsert or delete operation.
Result *DeleteDataResult `json:"result,omitempty"`
// Status of the delete operation.
Status DeleteDataStatus `json:"status,omitempty"`
}
type DeleteEndpointRequest ¶
type DeleteEndpointRequest struct {
// Name of the vector search endpoint
EndpointName string `json:"-" url:"-"`
}
type DeleteIndexRequest ¶
type DeleteIndexRequest struct {
// Name of the index
IndexName string `json:"-" url:"-"`
}
type DeltaSyncVectorIndexSpecRequest ¶
type DeltaSyncVectorIndexSpecRequest struct {
// [Optional] Select the columns to sync with the vector index. If you leave
// this field blank, all columns from the source table are synced with the
// index. The primary key column and embedding source column or embedding
// vector column are always synced.
ColumnsToSync []string `json:"columns_to_sync,omitempty"`
// The columns that contain the embedding source.
EmbeddingSourceColumns []EmbeddingSourceColumn `json:"embedding_source_columns,omitempty"`
// The columns that contain the embedding vectors.
EmbeddingVectorColumns []EmbeddingVectorColumn `json:"embedding_vector_columns,omitempty"`
// [Optional] Name of the Delta table to sync the vector index contents and
// computed embeddings to.
EmbeddingWritebackTable string `json:"embedding_writeback_table,omitempty"`
// Pipeline execution mode. - `TRIGGERED`: If the pipeline uses the
// triggered execution mode, the system stops processing after successfully
// refreshing the source table in the pipeline once, ensuring the table is
// updated based on the data available when the update started. -
// `CONTINUOUS`: If the pipeline uses continuous execution, the pipeline
// processes new data as it arrives in the source table to keep vector index
// fresh.
PipelineType PipelineType `json:"pipeline_type,omitempty"`
// The name of the source table.
SourceTable string `json:"source_table,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DeltaSyncVectorIndexSpecRequest) MarshalJSON ¶
func (s DeltaSyncVectorIndexSpecRequest) MarshalJSON() ([]byte, error)
func (*DeltaSyncVectorIndexSpecRequest) UnmarshalJSON ¶
func (s *DeltaSyncVectorIndexSpecRequest) UnmarshalJSON(b []byte) error
type DeltaSyncVectorIndexSpecResponse ¶
type DeltaSyncVectorIndexSpecResponse struct {
// The columns that contain the embedding source.
EmbeddingSourceColumns []EmbeddingSourceColumn `json:"embedding_source_columns,omitempty"`
// The columns that contain the embedding vectors.
EmbeddingVectorColumns []EmbeddingVectorColumn `json:"embedding_vector_columns,omitempty"`
// [Optional] Name of the Delta table to sync the vector index contents and
// computed embeddings to.
EmbeddingWritebackTable string `json:"embedding_writeback_table,omitempty"`
// The ID of the pipeline that is used to sync the index.
PipelineId string `json:"pipeline_id,omitempty"`
// Pipeline execution mode. - `TRIGGERED`: If the pipeline uses the
// triggered execution mode, the system stops processing after successfully
// refreshing the source table in the pipeline once, ensuring the table is
// updated based on the data available when the update started. -
// `CONTINUOUS`: If the pipeline uses continuous execution, the pipeline
// processes new data as it arrives in the source table to keep vector index
// fresh.
PipelineType PipelineType `json:"pipeline_type,omitempty"`
// The name of the source table.
SourceTable string `json:"source_table,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DeltaSyncVectorIndexSpecResponse) MarshalJSON ¶
func (s DeltaSyncVectorIndexSpecResponse) MarshalJSON() ([]byte, error)
func (*DeltaSyncVectorIndexSpecResponse) UnmarshalJSON ¶
func (s *DeltaSyncVectorIndexSpecResponse) UnmarshalJSON(b []byte) error
type DirectAccessVectorIndexSpec ¶
type DirectAccessVectorIndexSpec struct {
// The columns that contain the embedding source. The format should be
// array[double].
EmbeddingSourceColumns []EmbeddingSourceColumn `json:"embedding_source_columns,omitempty"`
// The columns that contain the embedding vectors. The format should be
// array[double].
EmbeddingVectorColumns []EmbeddingVectorColumn `json:"embedding_vector_columns,omitempty"`
// The schema of the index in JSON format. Supported types are `integer`,
// `long`, `float`, `double`, `boolean`, `string`, `date`, `timestamp`.
// Supported types for vector column: `array<float>`, `array<double>`,`.
SchemaJson string `json:"schema_json,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DirectAccessVectorIndexSpec) MarshalJSON ¶
func (s DirectAccessVectorIndexSpec) MarshalJSON() ([]byte, error)
func (*DirectAccessVectorIndexSpec) UnmarshalJSON ¶
func (s *DirectAccessVectorIndexSpec) UnmarshalJSON(b []byte) error
type EmbeddingSourceColumn ¶
type EmbeddingSourceColumn struct {
// Name of the embedding model endpoint, used by default for both ingestion
// and querying.
EmbeddingModelEndpointName string `json:"embedding_model_endpoint_name,omitempty"`
// Name of the embedding model endpoint which, if specified, is used for
// querying (not ingestion).
ModelEndpointNameForQuery string `json:"model_endpoint_name_for_query,omitempty"`
// Name of the column
Name string `json:"name,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (EmbeddingSourceColumn) MarshalJSON ¶
func (s EmbeddingSourceColumn) MarshalJSON() ([]byte, error)
func (*EmbeddingSourceColumn) UnmarshalJSON ¶
func (s *EmbeddingSourceColumn) UnmarshalJSON(b []byte) error
type EmbeddingVectorColumn ¶
type EmbeddingVectorColumn struct {
// Dimension of the embedding vector
EmbeddingDimension int `json:"embedding_dimension,omitempty"`
// Name of the column
Name string `json:"name,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (EmbeddingVectorColumn) MarshalJSON ¶
func (s EmbeddingVectorColumn) MarshalJSON() ([]byte, error)
func (*EmbeddingVectorColumn) UnmarshalJSON ¶
func (s *EmbeddingVectorColumn) UnmarshalJSON(b []byte) error
type EndpointInfo ¶
type EndpointInfo struct {
// Timestamp of endpoint creation
CreationTimestamp int64 `json:"creation_timestamp,omitempty"`
// Creator of the endpoint
Creator string `json:"creator,omitempty"`
// The custom tags assigned to the endpoint
CustomTags []CustomTag `json:"custom_tags,omitempty"`
// The budget policy id applied to the endpoint
EffectiveBudgetPolicyId string `json:"effective_budget_policy_id,omitempty"`
// Current status of the endpoint
EndpointStatus *EndpointStatus `json:"endpoint_status,omitempty"`
// Type of endpoint
EndpointType EndpointType `json:"endpoint_type,omitempty"`
// Unique identifier of the endpoint
Id string `json:"id,omitempty"`
// Timestamp of last update to the endpoint
LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"`
// User who last updated the endpoint
LastUpdatedUser string `json:"last_updated_user,omitempty"`
// Name of the vector search endpoint
Name string `json:"name,omitempty"`
// Number of indexes on the endpoint
NumIndexes int `json:"num_indexes,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (EndpointInfo) MarshalJSON ¶
func (s EndpointInfo) MarshalJSON() ([]byte, error)
func (*EndpointInfo) UnmarshalJSON ¶
func (s *EndpointInfo) UnmarshalJSON(b []byte) error
type EndpointStatus ¶
type EndpointStatus struct {
// Additional status message
Message string `json:"message,omitempty"`
// Current state of the endpoint
State EndpointStatusState `json:"state,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Status information of an endpoint
func (EndpointStatus) MarshalJSON ¶
func (s EndpointStatus) MarshalJSON() ([]byte, error)
func (*EndpointStatus) UnmarshalJSON ¶
func (s *EndpointStatus) UnmarshalJSON(b []byte) error
type EndpointStatusState ¶
type EndpointStatusState string
Current state of the endpoint
const EndpointStatusStateOffline EndpointStatusState = `OFFLINE`
const EndpointStatusStateOnline EndpointStatusState = `ONLINE`
const EndpointStatusStateProvisioning EndpointStatusState = `PROVISIONING`
const EndpointStatusStateRedState EndpointStatusState = `RED_STATE`
const EndpointStatusStateYellowState EndpointStatusState = `YELLOW_STATE`
func (*EndpointStatusState) Set ¶
func (f *EndpointStatusState) Set(v string) error
Set raw string value and validate it against allowed values
func (*EndpointStatusState) String ¶
func (f *EndpointStatusState) String() string
String representation for fmt.Print
func (*EndpointStatusState) Type ¶
func (f *EndpointStatusState) Type() string
Type always returns EndpointStatusState to satisfy [pflag.Value] interface
func (*EndpointStatusState) Values ¶ added in v0.72.0
func (f *EndpointStatusState) Values() []EndpointStatusState
Values returns all possible values for EndpointStatusState.
There is no guarantee on the order of the values in the slice.
type EndpointType ¶
type EndpointType string
Type of endpoint.
const EndpointTypeStandard EndpointType = `STANDARD`
func (*EndpointType) Set ¶
func (f *EndpointType) Set(v string) error
Set raw string value and validate it against allowed values
func (*EndpointType) String ¶
func (f *EndpointType) String() string
String representation for fmt.Print
func (*EndpointType) Type ¶
func (f *EndpointType) Type() string
Type always returns EndpointType to satisfy [pflag.Value] interface
func (*EndpointType) Values ¶ added in v0.72.0
func (f *EndpointType) Values() []EndpointType
Values returns all possible values for EndpointType.
There is no guarantee on the order of the values in the slice.
type GetEndpointRequest ¶
type GetEndpointRequest struct {
// Name of the endpoint
EndpointName string `json:"-" url:"-"`
}
type GetIndexRequest ¶
type GetIndexRequest struct {
// If true, the URL returned for the index is guaranteed to be compatible
// with the reranker. Currently this means we return the CP URL regardless
// of how the index is being accessed. If not set or set to false, the URL
// may still be compatible with the reranker depending on what URL we
// return.
EnsureRerankerCompatible bool `json:"-" url:"ensure_reranker_compatible,omitempty"`
// Name of the index
IndexName string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetIndexRequest) MarshalJSON ¶ added in v0.73.0
func (s GetIndexRequest) MarshalJSON() ([]byte, error)
func (*GetIndexRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *GetIndexRequest) UnmarshalJSON(b []byte) error
type ListEndpointResponse ¶
type ListEndpointResponse struct {
// An array of Endpoint objects
Endpoints []EndpointInfo `json:"endpoints,omitempty"`
// A token that can be used to get the next page of results. If not present,
// there are no more results to show.
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListEndpointResponse) MarshalJSON ¶
func (s ListEndpointResponse) MarshalJSON() ([]byte, error)
func (*ListEndpointResponse) UnmarshalJSON ¶
func (s *ListEndpointResponse) UnmarshalJSON(b []byte) error
type ListEndpointsRequest ¶
type ListEndpointsRequest struct {
// Token for pagination
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListEndpointsRequest) MarshalJSON ¶
func (s ListEndpointsRequest) MarshalJSON() ([]byte, error)
func (*ListEndpointsRequest) UnmarshalJSON ¶
func (s *ListEndpointsRequest) UnmarshalJSON(b []byte) error
type ListIndexesRequest ¶
type ListIndexesRequest struct {
// Name of the endpoint
EndpointName string `json:"-" url:"endpoint_name"`
// Token for pagination
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListIndexesRequest) MarshalJSON ¶
func (s ListIndexesRequest) MarshalJSON() ([]byte, error)
func (*ListIndexesRequest) UnmarshalJSON ¶
func (s *ListIndexesRequest) UnmarshalJSON(b []byte) error
type ListValue ¶ added in v0.41.0
type ListValue struct {
// Repeated field of dynamically typed values.
Values []Value `json:"values,omitempty"`
}
type ListVectorIndexesResponse ¶
type ListVectorIndexesResponse struct {
// A token that can be used to get the next page of results. If not present,
// there are no more results to show.
NextPageToken string `json:"next_page_token,omitempty"`
VectorIndexes []MiniVectorIndex `json:"vector_indexes,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListVectorIndexesResponse) MarshalJSON ¶
func (s ListVectorIndexesResponse) MarshalJSON() ([]byte, error)
func (*ListVectorIndexesResponse) UnmarshalJSON ¶
func (s *ListVectorIndexesResponse) UnmarshalJSON(b []byte) error
type MapStringValueEntry ¶ added in v0.41.0
type MapStringValueEntry struct {
// Column name.
Key string `json:"key,omitempty"`
// Column value, nullable.
Value *Value `json:"value,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Key-value pair.
func (MapStringValueEntry) MarshalJSON ¶ added in v0.41.0
func (s MapStringValueEntry) MarshalJSON() ([]byte, error)
func (*MapStringValueEntry) UnmarshalJSON ¶ added in v0.41.0
func (s *MapStringValueEntry) UnmarshalJSON(b []byte) error
type Metric ¶ added in v0.92.0
type Metric struct {
// Metric labels
Labels []MetricLabel `json:"labels,omitempty"`
// Metric name
Name string `json:"name,omitempty"`
// Percentile for the metric
Percentile float64 `json:"percentile,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Metric specification
func (Metric) MarshalJSON ¶ added in v0.92.0
func (*Metric) UnmarshalJSON ¶ added in v0.92.0
type MetricLabel ¶ added in v0.92.0
type MetricLabel struct {
// Label name
Name string `json:"name,omitempty"`
// Label value
Value string `json:"value,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Label for a metric
func (MetricLabel) MarshalJSON ¶ added in v0.92.0
func (s MetricLabel) MarshalJSON() ([]byte, error)
func (*MetricLabel) UnmarshalJSON ¶ added in v0.92.0
func (s *MetricLabel) UnmarshalJSON(b []byte) error
type MetricValue ¶ added in v0.92.0
type MetricValue struct {
// Timestamp of the metric value (milliseconds since epoch)
Timestamp int64 `json:"timestamp,omitempty"`
// Metric value
Value float64 `json:"value,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Single metric value at a specific timestamp
func (MetricValue) MarshalJSON ¶ added in v0.92.0
func (s MetricValue) MarshalJSON() ([]byte, error)
func (*MetricValue) UnmarshalJSON ¶ added in v0.92.0
func (s *MetricValue) UnmarshalJSON(b []byte) error
type MetricValues ¶ added in v0.92.0
type MetricValues struct {
// Metric specification
Metric *Metric `json:"metric,omitempty"`
// Time series of metric values
Values []MetricValue `json:"values,omitempty"`
}
Collection of metric values for a specific metric
type MiniVectorIndex ¶
type MiniVectorIndex struct {
// The user who created the index.
Creator string `json:"creator,omitempty"`
// Name of the endpoint associated with the index
EndpointName string `json:"endpoint_name,omitempty"`
IndexType VectorIndexType `json:"index_type,omitempty"`
// Name of the index
Name string `json:"name,omitempty"`
// Primary key of the index
PrimaryKey string `json:"primary_key,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (MiniVectorIndex) MarshalJSON ¶
func (s MiniVectorIndex) MarshalJSON() ([]byte, error)
func (*MiniVectorIndex) UnmarshalJSON ¶
func (s *MiniVectorIndex) UnmarshalJSON(b []byte) error
type PatchEndpointBudgetPolicyRequest ¶ added in v0.64.0
type PatchEndpointBudgetPolicyResponse ¶ added in v0.64.0
type PatchEndpointBudgetPolicyResponse struct {
// The budget policy applied to the vector search endpoint.
EffectiveBudgetPolicyId string `json:"effective_budget_policy_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (PatchEndpointBudgetPolicyResponse) MarshalJSON ¶ added in v0.64.0
func (s PatchEndpointBudgetPolicyResponse) MarshalJSON() ([]byte, error)
func (*PatchEndpointBudgetPolicyResponse) UnmarshalJSON ¶ added in v0.64.0
func (s *PatchEndpointBudgetPolicyResponse) UnmarshalJSON(b []byte) error
type PipelineType ¶
type PipelineType string
Pipeline execution mode. - `TRIGGERED`: If the pipeline uses the triggered execution mode, the system stops processing after successfully refreshing the source table in the pipeline once, ensuring the table is updated based on the data available when the update started. - `CONTINUOUS`: If the pipeline uses continuous execution, the pipeline processes new data as it arrives in the source table to keep vector index fresh.
const PipelineTypeContinuous PipelineType = `CONTINUOUS`
If the pipeline uses continuous execution, the pipeline processes new data as it arrives in the source table to keep vector index fresh.
const PipelineTypeTriggered PipelineType = `TRIGGERED`
If the pipeline uses the triggered execution mode, the system stops processing after successfully refreshing the source table in the pipeline once, ensuring the table is updated based on the data available when the update started.
func (*PipelineType) Set ¶
func (f *PipelineType) Set(v string) error
Set raw string value and validate it against allowed values
func (*PipelineType) String ¶
func (f *PipelineType) String() string
String representation for fmt.Print
func (*PipelineType) Type ¶
func (f *PipelineType) Type() string
Type always returns PipelineType to satisfy [pflag.Value] interface
func (*PipelineType) Values ¶ added in v0.72.0
func (f *PipelineType) Values() []PipelineType
Values returns all possible values for PipelineType.
There is no guarantee on the order of the values in the slice.
type QueryVectorIndexNextPageRequest ¶ added in v0.43.0
type QueryVectorIndexNextPageRequest struct {
// Name of the endpoint.
EndpointName string `json:"endpoint_name,omitempty"`
// Name of the vector index to query.
IndexName string `json:"-" url:"-"`
// Page token returned from previous `QueryVectorIndex` or
// `QueryVectorIndexNextPage` API.
PageToken string `json:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Request payload for getting next page of results.
func (QueryVectorIndexNextPageRequest) MarshalJSON ¶ added in v0.43.0
func (s QueryVectorIndexNextPageRequest) MarshalJSON() ([]byte, error)
func (*QueryVectorIndexNextPageRequest) UnmarshalJSON ¶ added in v0.43.0
func (s *QueryVectorIndexNextPageRequest) UnmarshalJSON(b []byte) error
type QueryVectorIndexRequest ¶
type QueryVectorIndexRequest struct {
// List of column names to include in the response.
Columns []string `json:"columns"`
// Column names used to retrieve data to send to the reranker.
ColumnsToRerank []string `json:"columns_to_rerank,omitempty"`
// JSON string representing query filters.
//
// Example filters:
//
// - `{"id <": 5}`: Filter for id less than 5. - `{"id >": 5}`: Filter for
// id greater than 5. - `{"id <=": 5}`: Filter for id less than equal to 5.
// - `{"id >=": 5}`: Filter for id greater than equal to 5. - `{"id": 5}`:
// Filter for id equal to 5.
FiltersJson string `json:"filters_json,omitempty"`
// Name of the vector index to query.
IndexName string `json:"-" url:"-"`
// Number of results to return. Defaults to 10.
NumResults int `json:"num_results,omitempty"`
// Query text. Required for Delta Sync Index using model endpoint.
QueryText string `json:"query_text,omitempty"`
// The query type to use. Choices are `ANN` and `HYBRID` and `FULL_TEXT`.
// Defaults to `ANN`.
QueryType string `json:"query_type,omitempty"`
// Query vector. Required for Direct Vector Access Index and Delta Sync
// Index using self-managed vectors.
QueryVector []float64 `json:"query_vector,omitempty"`
Reranker *RerankerConfig `json:"reranker,omitempty"`
// Threshold for the approximate nearest neighbor search. Defaults to 0.0.
ScoreThreshold float64 `json:"score_threshold,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (QueryVectorIndexRequest) MarshalJSON ¶
func (s QueryVectorIndexRequest) MarshalJSON() ([]byte, error)
func (*QueryVectorIndexRequest) UnmarshalJSON ¶
func (s *QueryVectorIndexRequest) UnmarshalJSON(b []byte) error
type QueryVectorIndexResponse ¶
type QueryVectorIndexResponse struct {
// Metadata about the result set.
Manifest *ResultManifest `json:"manifest,omitempty"`
// [Optional] Token that can be used in `QueryVectorIndexNextPage` API to
// get next page of results. If more than 1000 results satisfy the query,
// they are returned in groups of 1000. Empty value means no more results.
// The maximum number of results that can be returned is 10,000.
NextPageToken string `json:"next_page_token,omitempty"`
// Data returned in the query result.
Result *ResultData `json:"result,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (QueryVectorIndexResponse) MarshalJSON ¶ added in v0.43.0
func (s QueryVectorIndexResponse) MarshalJSON() ([]byte, error)
func (*QueryVectorIndexResponse) UnmarshalJSON ¶ added in v0.43.0
func (s *QueryVectorIndexResponse) UnmarshalJSON(b []byte) error
type RerankerConfig ¶ added in v0.82.0
type RerankerConfig struct {
Model string `json:"model,omitempty"`
Parameters *RerankerConfigRerankerParameters `json:"parameters,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (RerankerConfig) MarshalJSON ¶ added in v0.82.0
func (s RerankerConfig) MarshalJSON() ([]byte, error)
func (*RerankerConfig) UnmarshalJSON ¶ added in v0.82.0
func (s *RerankerConfig) UnmarshalJSON(b []byte) error
type RerankerConfigRerankerParameters ¶ added in v0.82.0
type RerankerConfigRerankerParameters struct {
ColumnsToRerank []string `json:"columns_to_rerank,omitempty"`
}
type ResultData ¶
type ResultData struct {
// Data rows returned in the query.
DataArray [][]string `json:"data_array,omitempty"`
// Number of rows in the result set.
RowCount int `json:"row_count,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Data returned in the query result.
func (ResultData) MarshalJSON ¶
func (s ResultData) MarshalJSON() ([]byte, error)
func (*ResultData) UnmarshalJSON ¶
func (s *ResultData) UnmarshalJSON(b []byte) error
type ResultManifest ¶
type ResultManifest struct {
// Number of columns in the result set.
ColumnCount int `json:"column_count,omitempty"`
// Information about each column in the result set.
Columns []ColumnInfo `json:"columns,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Metadata about the result set.
func (ResultManifest) MarshalJSON ¶
func (s ResultManifest) MarshalJSON() ([]byte, error)
func (*ResultManifest) UnmarshalJSON ¶
func (s *ResultManifest) UnmarshalJSON(b []byte) error
type RetrieveUserVisibleMetricsRequest ¶ added in v0.92.0
type RetrieveUserVisibleMetricsRequest struct {
// End time for metrics query
EndTime string `json:"end_time,omitempty"`
// Granularity in seconds
GranularityInSeconds int `json:"granularity_in_seconds,omitempty"`
// List of metrics to retrieve
Metrics []Metric `json:"metrics,omitempty"`
// Vector search endpoint name
Name string `json:"-" url:"-"`
// Token for pagination
PageToken string `json:"page_token,omitempty"`
// Start time for metrics query
StartTime string `json:"start_time,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Request to retrieve user-visible metrics
func (RetrieveUserVisibleMetricsRequest) MarshalJSON ¶ added in v0.92.0
func (s RetrieveUserVisibleMetricsRequest) MarshalJSON() ([]byte, error)
func (*RetrieveUserVisibleMetricsRequest) UnmarshalJSON ¶ added in v0.92.0
func (s *RetrieveUserVisibleMetricsRequest) UnmarshalJSON(b []byte) error
type RetrieveUserVisibleMetricsResponse ¶ added in v0.92.0
type RetrieveUserVisibleMetricsResponse struct {
// Collection of metric values
MetricValues []MetricValues `json:"metric_values,omitempty"`
// A token that can be used to get the next page of results. If not present,
// there are no more results to show.
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Response containing user-visible metrics
func (RetrieveUserVisibleMetricsResponse) MarshalJSON ¶ added in v0.92.0
func (s RetrieveUserVisibleMetricsResponse) MarshalJSON() ([]byte, error)
func (*RetrieveUserVisibleMetricsResponse) UnmarshalJSON ¶ added in v0.92.0
func (s *RetrieveUserVisibleMetricsResponse) UnmarshalJSON(b []byte) error
type ScanVectorIndexRequest ¶ added in v0.41.0
type ScanVectorIndexRequest struct {
// Name of the vector index to scan.
IndexName string `json:"-" url:"-"`
// Primary key of the last entry returned in the previous scan.
LastPrimaryKey string `json:"last_primary_key,omitempty"`
// Number of results to return. Defaults to 10.
NumResults int `json:"num_results,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ScanVectorIndexRequest) MarshalJSON ¶ added in v0.41.0
func (s ScanVectorIndexRequest) MarshalJSON() ([]byte, error)
func (*ScanVectorIndexRequest) UnmarshalJSON ¶ added in v0.41.0
func (s *ScanVectorIndexRequest) UnmarshalJSON(b []byte) error
type ScanVectorIndexResponse ¶ added in v0.41.0
type ScanVectorIndexResponse struct {
// List of data entries
Data []Struct `json:"data,omitempty"`
// Primary key of the last entry.
LastPrimaryKey string `json:"last_primary_key,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Response to a scan vector index request.
func (ScanVectorIndexResponse) MarshalJSON ¶ added in v0.41.0
func (s ScanVectorIndexResponse) MarshalJSON() ([]byte, error)
func (*ScanVectorIndexResponse) UnmarshalJSON ¶ added in v0.41.0
func (s *ScanVectorIndexResponse) UnmarshalJSON(b []byte) error
type Struct ¶ added in v0.41.0
type Struct struct {
// Data entry, corresponding to a row in a vector index.
Fields []MapStringValueEntry `json:"fields,omitempty"`
}
type SyncIndexRequest ¶
type SyncIndexRequest struct {
// Name of the vector index to synchronize. Must be a Delta Sync Index.
IndexName string `json:"-" url:"-"`
}
type UpdateEndpointCustomTagsRequest ¶ added in v0.64.0
type UpdateEndpointCustomTagsResponse ¶ added in v0.64.0
type UpdateEndpointCustomTagsResponse struct {
// All the custom tags that are applied to the vector search endpoint.
CustomTags []CustomTag `json:"custom_tags,omitempty"`
// The name of the vector search endpoint whose custom tags were updated.
Name string `json:"name,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpdateEndpointCustomTagsResponse) MarshalJSON ¶ added in v0.64.0
func (s UpdateEndpointCustomTagsResponse) MarshalJSON() ([]byte, error)
func (*UpdateEndpointCustomTagsResponse) UnmarshalJSON ¶ added in v0.64.0
func (s *UpdateEndpointCustomTagsResponse) UnmarshalJSON(b []byte) error
type UpsertDataResult ¶
type UpsertDataResult struct {
// List of primary keys for rows that failed to process.
FailedPrimaryKeys []string `json:"failed_primary_keys,omitempty"`
// Count of successfully processed rows.
SuccessRowCount int64 `json:"success_row_count,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UpsertDataResult) MarshalJSON ¶
func (s UpsertDataResult) MarshalJSON() ([]byte, error)
func (*UpsertDataResult) UnmarshalJSON ¶
func (s *UpsertDataResult) UnmarshalJSON(b []byte) error
type UpsertDataStatus ¶
type UpsertDataStatus string
const UpsertDataStatusFailure UpsertDataStatus = `FAILURE`
const UpsertDataStatusPartialSuccess UpsertDataStatus = `PARTIAL_SUCCESS`
const UpsertDataStatusSuccess UpsertDataStatus = `SUCCESS`
func (*UpsertDataStatus) Set ¶
func (f *UpsertDataStatus) Set(v string) error
Set raw string value and validate it against allowed values
func (*UpsertDataStatus) String ¶
func (f *UpsertDataStatus) String() string
String representation for fmt.Print
func (*UpsertDataStatus) Type ¶
func (f *UpsertDataStatus) Type() string
Type always returns UpsertDataStatus to satisfy [pflag.Value] interface
func (*UpsertDataStatus) Values ¶ added in v0.72.0
func (f *UpsertDataStatus) Values() []UpsertDataStatus
Values returns all possible values for UpsertDataStatus.
There is no guarantee on the order of the values in the slice.
type UpsertDataVectorIndexResponse ¶
type UpsertDataVectorIndexResponse struct {
// Result of the upsert or delete operation.
Result *UpsertDataResult `json:"result,omitempty"`
// Status of the upsert operation.
Status UpsertDataStatus `json:"status,omitempty"`
}
type Value ¶ added in v0.41.0
type Value struct {
BoolValue bool `json:"bool_value,omitempty"`
ListValue *ListValue `json:"list_value,omitempty"`
NumberValue float64 `json:"number_value,omitempty"`
StringValue string `json:"string_value,omitempty"`
StructValue *Struct `json:"struct_value,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (Value) MarshalJSON ¶ added in v0.41.0
func (*Value) UnmarshalJSON ¶ added in v0.41.0
type VectorIndex ¶
type VectorIndex struct {
// The user who created the index.
Creator string `json:"creator,omitempty"`
DeltaSyncIndexSpec *DeltaSyncVectorIndexSpecResponse `json:"delta_sync_index_spec,omitempty"`
DirectAccessIndexSpec *DirectAccessVectorIndexSpec `json:"direct_access_index_spec,omitempty"`
// Name of the endpoint associated with the index
EndpointName string `json:"endpoint_name,omitempty"`
IndexType VectorIndexType `json:"index_type,omitempty"`
// Name of the index
Name string `json:"name,omitempty"`
// Primary key of the index
PrimaryKey string `json:"primary_key,omitempty"`
Status *VectorIndexStatus `json:"status,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (VectorIndex) MarshalJSON ¶
func (s VectorIndex) MarshalJSON() ([]byte, error)
func (*VectorIndex) UnmarshalJSON ¶
func (s *VectorIndex) UnmarshalJSON(b []byte) error
type VectorIndexStatus ¶
type VectorIndexStatus struct {
// Index API Url to be used to perform operations on the index
IndexUrl string `json:"index_url,omitempty"`
// Number of rows indexed
IndexedRowCount int64 `json:"indexed_row_count,omitempty"`
// Message associated with the index status
Message string `json:"message,omitempty"`
// Whether the index is ready for search
Ready bool `json:"ready,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (VectorIndexStatus) MarshalJSON ¶
func (s VectorIndexStatus) MarshalJSON() ([]byte, error)
func (*VectorIndexStatus) UnmarshalJSON ¶
func (s *VectorIndexStatus) UnmarshalJSON(b []byte) error
type VectorIndexType ¶
type VectorIndexType string
There are 2 types of Vector Search indexes: - `DELTA_SYNC`: An index that automatically syncs with a source Delta Table, automatically and incrementally updating the index as the underlying data in the Delta Table changes. - `DIRECT_ACCESS`: An index that supports direct read and write of vectors and metadata through our REST and SDK APIs. With this model, the user manages index updates.
const VectorIndexTypeDeltaSync VectorIndexType = `DELTA_SYNC`
An index that automatically syncs with a source Delta Table, automatically and incrementally updating the index as the underlying data in the Delta Table changes.
const VectorIndexTypeDirectAccess VectorIndexType = `DIRECT_ACCESS`
An index that supports direct read and write of vectors and metadata through our REST and SDK APIs. With this model, the user manages index updates.
func (*VectorIndexType) Set ¶
func (f *VectorIndexType) Set(v string) error
Set raw string value and validate it against allowed values
func (*VectorIndexType) String ¶
func (f *VectorIndexType) String() string
String representation for fmt.Print
func (*VectorIndexType) Type ¶
func (f *VectorIndexType) Type() string
Type always returns VectorIndexType to satisfy [pflag.Value] interface
func (*VectorIndexType) Values ¶ added in v0.72.0
func (f *VectorIndexType) Values() []VectorIndexType
Values returns all possible values for VectorIndexType.
There is no guarantee on the order of the values in the slice.
type VectorSearchEndpointsAPI ¶
type VectorSearchEndpointsAPI struct {
// contains filtered or unexported fields
}
**Endpoint**: Represents the compute resources to host vector search indexes.
func NewVectorSearchEndpoints ¶
func NewVectorSearchEndpoints(client *client.DatabricksClient) *VectorSearchEndpointsAPI
func (*VectorSearchEndpointsAPI) CreateEndpoint ¶
func (a *VectorSearchEndpointsAPI) CreateEndpoint(ctx context.Context, createEndpoint CreateEndpoint) (*WaitGetEndpointVectorSearchEndpointOnline[EndpointInfo], error)
Create a new endpoint.
func (*VectorSearchEndpointsAPI) CreateEndpointAndWait
deprecated
func (a *VectorSearchEndpointsAPI) CreateEndpointAndWait(ctx context.Context, createEndpoint CreateEndpoint, options ...retries.Option[EndpointInfo]) (*EndpointInfo, error)
Calls VectorSearchEndpointsAPI.CreateEndpoint and waits to reach ONLINE state
You can override the default timeout of 20 minutes by calling adding retries.Timeout[EndpointInfo](60*time.Minute) functional option.
Deprecated: use VectorSearchEndpointsAPI.CreateEndpoint.Get() or VectorSearchEndpointsAPI.WaitGetEndpointVectorSearchEndpointOnline
func (*VectorSearchEndpointsAPI) DeleteEndpoint ¶
func (a *VectorSearchEndpointsAPI) DeleteEndpoint(ctx context.Context, request DeleteEndpointRequest) error
func (*VectorSearchEndpointsAPI) DeleteEndpointByEndpointName ¶
func (a *VectorSearchEndpointsAPI) DeleteEndpointByEndpointName(ctx context.Context, endpointName string) error
Delete a vector search endpoint.
func (*VectorSearchEndpointsAPI) GetEndpoint ¶
func (a *VectorSearchEndpointsAPI) GetEndpoint(ctx context.Context, request GetEndpointRequest) (*EndpointInfo, error)
func (*VectorSearchEndpointsAPI) GetEndpointByEndpointName ¶
func (a *VectorSearchEndpointsAPI) GetEndpointByEndpointName(ctx context.Context, endpointName string) (*EndpointInfo, error)
Get details for a single vector search endpoint.
func (*VectorSearchEndpointsAPI) ListEndpoints ¶
func (a *VectorSearchEndpointsAPI) ListEndpoints(ctx context.Context, request ListEndpointsRequest) listing.Iterator[EndpointInfo]
List all vector search endpoints in the workspace.
func (*VectorSearchEndpointsAPI) ListEndpointsAll ¶
func (a *VectorSearchEndpointsAPI) ListEndpointsAll(ctx context.Context, request ListEndpointsRequest) ([]EndpointInfo, error)
List all vector search endpoints in the workspace.
func (*VectorSearchEndpointsAPI) RetrieveUserVisibleMetrics ¶ added in v0.92.0
func (a *VectorSearchEndpointsAPI) RetrieveUserVisibleMetrics(ctx context.Context, request RetrieveUserVisibleMetricsRequest) (*RetrieveUserVisibleMetricsResponse, error)
func (*VectorSearchEndpointsAPI) UpdateEndpointBudgetPolicy ¶ added in v0.64.0
func (a *VectorSearchEndpointsAPI) UpdateEndpointBudgetPolicy(ctx context.Context, request PatchEndpointBudgetPolicyRequest) (*PatchEndpointBudgetPolicyResponse, error)
func (*VectorSearchEndpointsAPI) UpdateEndpointCustomTags ¶ added in v0.64.0
func (a *VectorSearchEndpointsAPI) UpdateEndpointCustomTags(ctx context.Context, request UpdateEndpointCustomTagsRequest) (*UpdateEndpointCustomTagsResponse, error)
func (*VectorSearchEndpointsAPI) WaitGetEndpointVectorSearchEndpointOnline ¶
func (a *VectorSearchEndpointsAPI) WaitGetEndpointVectorSearchEndpointOnline(ctx context.Context, endpointName string, timeout time.Duration, callback func(*EndpointInfo)) (*EndpointInfo, error)
WaitGetEndpointVectorSearchEndpointOnline repeatedly calls VectorSearchEndpointsAPI.GetEndpoint and waits to reach ONLINE state
type VectorSearchEndpointsInterface ¶
type VectorSearchEndpointsInterface interface {
// WaitGetEndpointVectorSearchEndpointOnline repeatedly calls [VectorSearchEndpointsAPI.GetEndpoint] and waits to reach ONLINE state
WaitGetEndpointVectorSearchEndpointOnline(ctx context.Context, endpointName string,
timeout time.Duration, callback func(*EndpointInfo)) (*EndpointInfo, error)
// Create a new endpoint.
CreateEndpoint(ctx context.Context, createEndpoint CreateEndpoint) (*WaitGetEndpointVectorSearchEndpointOnline[EndpointInfo], error)
// Calls [VectorSearchEndpointsAPIInterface.CreateEndpoint] and waits to reach ONLINE state
//
// You can override the default timeout of 20 minutes by calling adding
// retries.Timeout[EndpointInfo](60*time.Minute) functional option.
//
// Deprecated: use [VectorSearchEndpointsAPIInterface.CreateEndpoint].Get() or [VectorSearchEndpointsAPIInterface.WaitGetEndpointVectorSearchEndpointOnline]
CreateEndpointAndWait(ctx context.Context, createEndpoint CreateEndpoint, options ...retries.Option[EndpointInfo]) (*EndpointInfo, error)
// Delete a vector search endpoint.
DeleteEndpoint(ctx context.Context, request DeleteEndpointRequest) error
// Delete a vector search endpoint.
DeleteEndpointByEndpointName(ctx context.Context, endpointName string) error
// Get details for a single vector search endpoint.
GetEndpoint(ctx context.Context, request GetEndpointRequest) (*EndpointInfo, error)
// Get details for a single vector search endpoint.
GetEndpointByEndpointName(ctx context.Context, endpointName string) (*EndpointInfo, error)
// List all vector search endpoints in the workspace.
//
// This method is generated by Databricks SDK Code Generator.
ListEndpoints(ctx context.Context, request ListEndpointsRequest) listing.Iterator[EndpointInfo]
// List all vector search endpoints in the workspace.
//
// This method is generated by Databricks SDK Code Generator.
ListEndpointsAll(ctx context.Context, request ListEndpointsRequest) ([]EndpointInfo, error)
// Retrieve user-visible metrics for an endpoint
RetrieveUserVisibleMetrics(ctx context.Context, request RetrieveUserVisibleMetricsRequest) (*RetrieveUserVisibleMetricsResponse, error)
// Update the budget policy of an endpoint
UpdateEndpointBudgetPolicy(ctx context.Context, request PatchEndpointBudgetPolicyRequest) (*PatchEndpointBudgetPolicyResponse, error)
// Update the custom tags of an endpoint.
UpdateEndpointCustomTags(ctx context.Context, request UpdateEndpointCustomTagsRequest) (*UpdateEndpointCustomTagsResponse, error)
}
type VectorSearchEndpointsService
deprecated
type VectorSearchEndpointsService interface {
// Create a new endpoint.
CreateEndpoint(ctx context.Context, request CreateEndpoint) (*EndpointInfo, error)
// Delete a vector search endpoint.
DeleteEndpoint(ctx context.Context, request DeleteEndpointRequest) error
// Get details for a single vector search endpoint.
GetEndpoint(ctx context.Context, request GetEndpointRequest) (*EndpointInfo, error)
// List all vector search endpoints in the workspace.
ListEndpoints(ctx context.Context, request ListEndpointsRequest) (*ListEndpointResponse, error)
// Retrieve user-visible metrics for an endpoint
RetrieveUserVisibleMetrics(ctx context.Context, request RetrieveUserVisibleMetricsRequest) (*RetrieveUserVisibleMetricsResponse, error)
// Update the budget policy of an endpoint
UpdateEndpointBudgetPolicy(ctx context.Context, request PatchEndpointBudgetPolicyRequest) (*PatchEndpointBudgetPolicyResponse, error)
// Update the custom tags of an endpoint.
UpdateEndpointCustomTags(ctx context.Context, request UpdateEndpointCustomTagsRequest) (*UpdateEndpointCustomTagsResponse, error)
}
**Endpoint**: Represents the compute resources to host vector search indexes.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type VectorSearchIndexesAPI ¶
type VectorSearchIndexesAPI struct {
// contains filtered or unexported fields
}
**Index**: An efficient representation of your embedding vectors that supports real-time and efficient approximate nearest neighbor (ANN) search queries.
There are 2 types of Vector Search indexes: - **Delta Sync Index**: An index that automatically syncs with a source Delta Table, automatically and incrementally updating the index as the underlying data in the Delta Table changes. - **Direct Vector Access Index**: An index that supports direct read and write of vectors and metadata through our REST and SDK APIs. With this model, the user manages index updates.
func NewVectorSearchIndexes ¶
func NewVectorSearchIndexes(client *client.DatabricksClient) *VectorSearchIndexesAPI
func (*VectorSearchIndexesAPI) CreateIndex ¶
func (a *VectorSearchIndexesAPI) CreateIndex(ctx context.Context, request CreateVectorIndexRequest) (*VectorIndex, error)
func (*VectorSearchIndexesAPI) DeleteDataVectorIndex ¶
func (a *VectorSearchIndexesAPI) DeleteDataVectorIndex(ctx context.Context, request DeleteDataVectorIndexRequest) (*DeleteDataVectorIndexResponse, error)
func (*VectorSearchIndexesAPI) DeleteDataVectorIndexByIndexName ¶ added in v0.64.0
func (a *VectorSearchIndexesAPI) DeleteDataVectorIndexByIndexName(ctx context.Context, indexName string) (*DeleteDataVectorIndexResponse, error)
Handles the deletion of data from a specified vector index.
func (*VectorSearchIndexesAPI) DeleteIndex ¶
func (a *VectorSearchIndexesAPI) DeleteIndex(ctx context.Context, request DeleteIndexRequest) error
func (*VectorSearchIndexesAPI) DeleteIndexByIndexName ¶
func (a *VectorSearchIndexesAPI) DeleteIndexByIndexName(ctx context.Context, indexName string) error
Delete an index.
func (*VectorSearchIndexesAPI) GetIndex ¶
func (a *VectorSearchIndexesAPI) GetIndex(ctx context.Context, request GetIndexRequest) (*VectorIndex, error)
func (*VectorSearchIndexesAPI) GetIndexByIndexName ¶
func (a *VectorSearchIndexesAPI) GetIndexByIndexName(ctx context.Context, indexName string) (*VectorIndex, error)
Get an index.
func (*VectorSearchIndexesAPI) ListIndexes ¶
func (a *VectorSearchIndexesAPI) ListIndexes(ctx context.Context, request ListIndexesRequest) listing.Iterator[MiniVectorIndex]
List all indexes in the given endpoint.
func (*VectorSearchIndexesAPI) ListIndexesAll ¶
func (a *VectorSearchIndexesAPI) ListIndexesAll(ctx context.Context, request ListIndexesRequest) ([]MiniVectorIndex, error)
List all indexes in the given endpoint.
func (*VectorSearchIndexesAPI) QueryIndex ¶
func (a *VectorSearchIndexesAPI) QueryIndex(ctx context.Context, request QueryVectorIndexRequest) (*QueryVectorIndexResponse, error)
func (*VectorSearchIndexesAPI) QueryNextPage ¶ added in v0.43.0
func (a *VectorSearchIndexesAPI) QueryNextPage(ctx context.Context, request QueryVectorIndexNextPageRequest) (*QueryVectorIndexResponse, error)
func (*VectorSearchIndexesAPI) ScanIndex ¶ added in v0.41.0
func (a *VectorSearchIndexesAPI) ScanIndex(ctx context.Context, request ScanVectorIndexRequest) (*ScanVectorIndexResponse, error)
func (*VectorSearchIndexesAPI) SyncIndex ¶
func (a *VectorSearchIndexesAPI) SyncIndex(ctx context.Context, request SyncIndexRequest) error
func (*VectorSearchIndexesAPI) UpsertDataVectorIndex ¶
func (a *VectorSearchIndexesAPI) UpsertDataVectorIndex(ctx context.Context, request UpsertDataVectorIndexRequest) (*UpsertDataVectorIndexResponse, error)
type VectorSearchIndexesInterface ¶
type VectorSearchIndexesInterface interface {
// Create a new index.
CreateIndex(ctx context.Context, request CreateVectorIndexRequest) (*VectorIndex, error)
// Handles the deletion of data from a specified vector index.
DeleteDataVectorIndex(ctx context.Context, request DeleteDataVectorIndexRequest) (*DeleteDataVectorIndexResponse, error)
// Handles the deletion of data from a specified vector index.
DeleteDataVectorIndexByIndexName(ctx context.Context, indexName string) (*DeleteDataVectorIndexResponse, error)
// Delete an index.
DeleteIndex(ctx context.Context, request DeleteIndexRequest) error
// Delete an index.
DeleteIndexByIndexName(ctx context.Context, indexName string) error
// Get an index.
GetIndex(ctx context.Context, request GetIndexRequest) (*VectorIndex, error)
// Get an index.
GetIndexByIndexName(ctx context.Context, indexName string) (*VectorIndex, error)
// List all indexes in the given endpoint.
//
// This method is generated by Databricks SDK Code Generator.
ListIndexes(ctx context.Context, request ListIndexesRequest) listing.Iterator[MiniVectorIndex]
// List all indexes in the given endpoint.
//
// This method is generated by Databricks SDK Code Generator.
ListIndexesAll(ctx context.Context, request ListIndexesRequest) ([]MiniVectorIndex, error)
// Query the specified vector index.
QueryIndex(ctx context.Context, request QueryVectorIndexRequest) (*QueryVectorIndexResponse, error)
// Use `next_page_token` returned from previous `QueryVectorIndex` or
// `QueryVectorIndexNextPage` request to fetch next page of results.
QueryNextPage(ctx context.Context, request QueryVectorIndexNextPageRequest) (*QueryVectorIndexResponse, error)
// Scan the specified vector index and return the first `num_results` entries
// after the exclusive `primary_key`.
ScanIndex(ctx context.Context, request ScanVectorIndexRequest) (*ScanVectorIndexResponse, error)
// Triggers a synchronization process for a specified vector index.
SyncIndex(ctx context.Context, request SyncIndexRequest) error
// Handles the upserting of data into a specified vector index.
UpsertDataVectorIndex(ctx context.Context, request UpsertDataVectorIndexRequest) (*UpsertDataVectorIndexResponse, error)
}
type VectorSearchIndexesService
deprecated
type VectorSearchIndexesService interface {
// Create a new index.
CreateIndex(ctx context.Context, request CreateVectorIndexRequest) (*VectorIndex, error)
// Handles the deletion of data from a specified vector index.
DeleteDataVectorIndex(ctx context.Context, request DeleteDataVectorIndexRequest) (*DeleteDataVectorIndexResponse, error)
// Delete an index.
DeleteIndex(ctx context.Context, request DeleteIndexRequest) error
// Get an index.
GetIndex(ctx context.Context, request GetIndexRequest) (*VectorIndex, error)
// List all indexes in the given endpoint.
ListIndexes(ctx context.Context, request ListIndexesRequest) (*ListVectorIndexesResponse, error)
// Query the specified vector index.
QueryIndex(ctx context.Context, request QueryVectorIndexRequest) (*QueryVectorIndexResponse, error)
// Use `next_page_token` returned from previous `QueryVectorIndex` or
// `QueryVectorIndexNextPage` request to fetch next page of results.
QueryNextPage(ctx context.Context, request QueryVectorIndexNextPageRequest) (*QueryVectorIndexResponse, error)
// Scan the specified vector index and return the first `num_results`
// entries after the exclusive `primary_key`.
ScanIndex(ctx context.Context, request ScanVectorIndexRequest) (*ScanVectorIndexResponse, error)
// Triggers a synchronization process for a specified vector index.
SyncIndex(ctx context.Context, request SyncIndexRequest) error
// Handles the upserting of data into a specified vector index.
UpsertDataVectorIndex(ctx context.Context, request UpsertDataVectorIndexRequest) (*UpsertDataVectorIndexResponse, error)
}
**Index**: An efficient representation of your embedding vectors that supports real-time and efficient approximate nearest neighbor (ANN) search queries.
There are 2 types of Vector Search indexes: - **Delta Sync Index**: An index that automatically syncs with a source Delta Table, automatically and incrementally updating the index as the underlying data in the Delta Table changes. - **Direct Vector Access Index**: An index that supports direct read and write of vectors and metadata through our REST and SDK APIs. With this model, the user manages index updates.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type WaitGetEndpointVectorSearchEndpointOnline ¶
type WaitGetEndpointVectorSearchEndpointOnline[R any] struct { Response *R EndpointName string `json:"endpoint_name"` Poll func(time.Duration, func(*EndpointInfo)) (*EndpointInfo, error) // contains filtered or unexported fields }
WaitGetEndpointVectorSearchEndpointOnline is a wrapper that calls VectorSearchEndpointsAPI.WaitGetEndpointVectorSearchEndpointOnline and waits to reach ONLINE state.
func (*WaitGetEndpointVectorSearchEndpointOnline[R]) Get ¶
func (w *WaitGetEndpointVectorSearchEndpointOnline[R]) Get() (*EndpointInfo, error)
Get the EndpointInfo with the default timeout of 20 minutes.
func (*WaitGetEndpointVectorSearchEndpointOnline[R]) GetWithTimeout ¶
func (w *WaitGetEndpointVectorSearchEndpointOnline[R]) GetWithTimeout(timeout time.Duration) (*EndpointInfo, error)
Get the EndpointInfo with custom timeout.
func (*WaitGetEndpointVectorSearchEndpointOnline[R]) OnProgress ¶
func (w *WaitGetEndpointVectorSearchEndpointOnline[R]) OnProgress(callback func(*EndpointInfo)) *WaitGetEndpointVectorSearchEndpointOnline[R]
OnProgress invokes a callback every time it polls for the status update.