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
datapoint
DatapointForQuery データポイントneighborCount
number 近傍データの数
SparseEmbedding
Type: Object
Properties
SearchResultValue
Type: Object
Properties
-
nearestNeighbors
Array<Object> 近傍データnearestNeighbors[].neighbors
Array<Object> 近傍データnearestNeighbors[].neighbors
Object [].datapoint - データポイントnearestNeighbors[].neighbors
string [].datapoint.datapointId - データポイント IDnearestNeighbors[].neighbors
Object [].datapoint.crowdingTag - クラウディングタグnearestNeighbors[].neighbors
string [].datapoint.crowdingTag.crowdingAttribute - クラウディング属性nearestNeighbors[].neighbors
number [].distance - 距離nearestNeighbors[].neighbors
number [].sparseDistance - スパース距離
Restricts
Type: Object
Properties
NumericRestrictsInt
Type: Object
Properties
NumericRestrictsFloat
Type: Object
Properties
NumericRestrictsDouble
Type: Object
Properties
Datapoint
Type: Object
Properties
datapoint_id
string データポイントの IDfeature_vector
Array<number> 特徴ベクトルrestricts
Restricts? 制約numeric_restricts
(NumericRestrictsInt | NumericRestrictsFloat | NumericRestrictsDouble)? 数値的制限
DatapointForQuery
Type: Object
Properties
datapoint_id
string? データポイントの ID (feature_vector が未指定の場合必須)feature_vector
Array<number>? 特徴ベクトル (datapoint_id が未指定の場合必須)sparse_embedding
SparseEmbedding? スパース埋め込み (datapoint_id と feature_vector の両方が未指定の場合必須)restricts
Restricts? 制約numeric_restricts
(NumericRestrictsInt | NumericRestrictsFloat | NumericRestrictsDouble)? 数値的制限
- Throws Error datapoint_id と feature_vector の両方が未指定の場合エラー
Data
Type: Object
Properties
upsert
データを挿入または更新する
Parameters
-
param
Data
Returns Promise<{}>
remove
データを削除する
Parameters
-
param
Object
Returns Promise<{}>
findNeighbors
近傍データを検索する
Parameters
-
param
Object
Returns Promise<SearchResultValue>
upsertWithKvs
データを挿入または更新する(KVS 統合版)
Parameters
-
param
Object
Returns Promise<{}>
removeWithKvs
データを削除する(KVS 統合版)
Parameters
-
param
Object
Returns Promise<{}>
findNeighborsWithKvs
近傍データを検索する(KVS 統合版)
Parameters
-
param
Object
Returns Promise<SearchResultValue>