Craft Vector Search
const { vectorSearch } = MODULES;Table of Contents
- Query
- SparseEmbedding
- SearchResultValue
- Restricts
- NumericRestrictsInt
- NumericRestrictsFloat
- NumericRestrictsDouble
- Datapoint
- DatapointForQuery
- Data
- upsert
- remove
- findNeighbors
- upsertWithKvs
- removeWithKvs
- findNeighborsWithKvs
Query
Type: Object
Properties
datapointDatapointForQuery データポイントneighborCountnumber 近傍データの数
SparseEmbedding
Type: Object
Properties
SearchResultValue
Type: Object
Properties
-
nearestNeighborsArray<Object> 近傍データnearestNeighbors[].neighborsArray<Object> 近傍データnearestNeighbors[].neighborsObject [].datapoint - データポイントnearestNeighbors[].neighborsstring [].datapoint.datapointId - データポイント IDnearestNeighbors[].neighborsObject [].datapoint.crowdingTag - クラウディングタグnearestNeighbors[].neighborsstring [].datapoint.crowdingTag.crowdingAttribute - クラウディング属性nearestNeighbors[].neighborsnumber [].distance - 距離nearestNeighbors[].neighborsnumber [].sparseDistance - スパース距離
Restricts
Type: Object
Properties
NumericRestrictsInt
Type: Object
Properties
NumericRestrictsFloat
Type: Object
Properties
NumericRestrictsDouble
Type: Object
Properties
Datapoint
Type: Object
Properties
datapoint_idstring データポイントの IDfeature_vectorArray<number> 特徴ベクトルrestrictsRestricts? 制約numeric_restricts(NumericRestrictsInt | NumericRestrictsFloat | NumericRestrictsDouble)? 数値的制限
DatapointForQuery
Type: Object
Properties
datapoint_idstring? データポイントの ID (feature_vector が未指定の場合必須)feature_vectorArray<number>? 特徴ベクトル (datapoint_id が未指定の場合必須)sparse_embeddingSparseEmbedding? スパース埋め込み (datapoint_id と feature_vector の両方が未指定の場合必須)restrictsRestricts? 制約numeric_restricts(NumericRestrictsInt | NumericRestrictsFloat | NumericRestrictsDouble)? 数値的制限
- Throws Error datapoint_id と feature_vector の両方が未指定の場合エラー
Data
Type: Object
Properties
upsert
データを挿入または更新する
Parameters
-
paramData
Returns Promise<{}>
remove
データを削除する
Parameters
-
paramObject
Returns Promise<{}>
findNeighbors
近傍データを検索する
Parameters
-
paramObject
Returns Promise<SearchResultValue>
upsertWithKvs
データを挿入または更新する(KVS 統合版)
Parameters
-
paramObject
Returns Promise<{}>
removeWithKvs
データを削除する(KVS 統合版)
Parameters
-
paramObject
Returns Promise<{}>
findNeighborsWithKvs
近傍データを検索する(KVS 統合版)
Parameters
-
paramObject
Returns Promise<SearchResultValue>