Monarch Database API - v1.0.0
Preparing search index...
VectorOperations
Interface VectorOperations
interface
VectorOperations
{
vadd
(
key
:
string
,
id
:
string
,
vector
:
number
[]
,
metadata
?:
Record
<
string
,
any
>
,
)
:
Promise
<
void
>
;
vcount
(
key
:
string
)
:
Promise
<
number
>
;
vdel
(
key
:
string
,
ids
:
string
[]
)
:
Promise
<
number
>
;
vget
(
key
:
string
,
id
:
string
)
:
Promise
<
VectorEntry
|
null
>
;
vsearch
(
key
:
string
,
queryVector
:
number
[]
,
topK
?:
number
,
includeMetadata
?:
boolean
,
)
:
Promise
<
VectorSearchResult
[]
>
;
}
Implemented by
DataStructures
Index
Methods
vadd
vcount
vdel
vget
vsearch
Methods
vadd
vadd
(
key
:
string
,
id
:
string
,
vector
:
number
[]
,
metadata
?:
Record
<
string
,
any
>
,
)
:
Promise
<
void
>
Parameters
key
:
string
id
:
string
vector
:
number
[]
Optional
metadata
:
Record
<
string
,
any
>
Returns
Promise
<
void
>
vcount
vcount
(
key
:
string
)
:
Promise
<
number
>
Parameters
key
:
string
Returns
Promise
<
number
>
vdel
vdel
(
key
:
string
,
ids
:
string
[]
)
:
Promise
<
number
>
Parameters
key
:
string
ids
:
string
[]
Returns
Promise
<
number
>
vget
vget
(
key
:
string
,
id
:
string
)
:
Promise
<
VectorEntry
|
null
>
Parameters
key
:
string
id
:
string
Returns
Promise
<
VectorEntry
|
null
>
vsearch
vsearch
(
key
:
string
,
queryVector
:
number
[]
,
topK
?:
number
,
includeMetadata
?:
boolean
,
)
:
Promise
<
VectorSearchResult
[]
>
Parameters
key
:
string
queryVector
:
number
[]
Optional
topK
:
number
Optional
includeMetadata
:
boolean
Returns
Promise
<
VectorSearchResult
[]
>
Settings
Member Visibility
Inherited
External
Theme
OS
Light
Dark
On This Page
Methods
vadd
vcount
vdel
vget
vsearch
Monarch Database API - v1.0.0
Loading...