Craft Vector Search
const { vectorSearch } = MODULES;Table of Contents
Section titled “Table of Contents”- Query
- SparseEmbedding
- SearchResultValue
- Restricts
- NumericRestrictsInt
- NumericRestrictsFloat
- NumericRestrictsDouble
- Datapoint
- DatapointForQuery
- Data
- upsert
- remove
- findNeighbors
- upsertWithKvs
- removeWithKvs
- findNeighborsWithKvs
Type: Object
Properties
Section titled “Properties”datapointDatapointForQuery データポイントneighborCountnumber 近傍データの数
SparseEmbedding
Section titled “SparseEmbedding”Type: Object
Properties
Section titled “Properties”SearchResultValue
Section titled “SearchResultValue”Type: Object
Properties
Section titled “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
Section titled “Restricts”Type: Object
Properties
Section titled “Properties”NumericRestrictsInt
Section titled “NumericRestrictsInt”Type: Object
Properties
Section titled “Properties”NumericRestrictsFloat
Section titled “NumericRestrictsFloat”Type: Object
Properties
Section titled “Properties”NumericRestrictsDouble
Section titled “NumericRestrictsDouble”Type: Object
Properties
Section titled “Properties”Datapoint
Section titled “Datapoint”Type: Object
Properties
Section titled “Properties”datapoint_idstring データポイントの IDfeature_vectorArray<number> 特徴ベクトルrestrictsRestricts? 制約numeric_restricts(NumericRestrictsInt | NumericRestrictsFloat | NumericRestrictsDouble)? 数値的制限
DatapointForQuery
Section titled “DatapointForQuery”Type: Object
Properties
Section titled “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 の両方が未指定の場合エラー
Type: Object
Properties
Section titled “Properties”upsert
Section titled “upsert”データを挿入または更新する
Parameters
Section titled “Parameters”-
paramData
Returns Promise<{}>
remove
Section titled “remove”データを削除する
Parameters
Section titled “Parameters”-
paramObject
Returns Promise<{}>
findNeighbors
Section titled “findNeighbors”近傍データを検索する
Parameters
Section titled “Parameters”-
paramObject
Returns Promise<SearchResultValue>
upsertWithKvs
Section titled “upsertWithKvs”データを挿入または更新する(KVS 統合版)
Parameters
Section titled “Parameters”-
paramObject
Returns Promise<{}>
removeWithKvs
Section titled “removeWithKvs”データを削除する(KVS 統合版)
Parameters
Section titled “Parameters”-
paramObject
Returns Promise<{}>
findNeighborsWithKvs
Section titled “findNeighborsWithKvs”近傍データを検索する(KVS 統合版)
Parameters
Section titled “Parameters”-
paramObject
Returns Promise<SearchResultValue>