Index
All Classes and Interfaces|All Packages|Serialized Form
A
- addItem(float[]) - Method in class com.spotify.voyager.jni.Index
-
Add an item (a vector) to this
Index
. - addItem(float[], long) - Method in class com.spotify.voyager.jni.Index
-
Add an item (a vector) to this
Index
with the provided identifier. - addItem(String, float[]) - Method in class com.spotify.voyager.jni.StringIndex
- addItem(String, List<Float>) - Method in class com.spotify.voyager.jni.StringIndex
- addItems(float[][], int) - Method in class com.spotify.voyager.jni.Index
-
Add multiple items (vectors) to this
Index
. - addItems(float[][], long[], int) - Method in class com.spotify.voyager.jni.Index
-
Add multiple items (vectors) to this
Index
with the provided identifiers. - addItems(Map<String, List<Float>>) - Method in class com.spotify.voyager.jni.StringIndex
- asBytes() - Method in class com.spotify.voyager.jni.Index
-
Returns the contents of this index as an array of bytes.
C
- close() - Method in class com.spotify.voyager.jni.Index
-
Close this
Index
and release any memory held by it. - close() - Method in class com.spotify.voyager.jni.StringIndex
- com.spotify.voyager - package com.spotify.voyager
-
Voyager is a Java and Python library that provides approximate nearest-neighbor search of vector data.
- com.spotify.voyager.jni - package com.spotify.voyager.jni
-
Java Native Interface (JNI) bindings to expose functionality from Voyager's C++ code into Java.
- com.spotify.voyager.jni.exception - package com.spotify.voyager.jni.exception
- com.spotify.voyager.jni.utils - package com.spotify.voyager.jni.utils
- Cosine - Enum constant in enum com.spotify.voyager.jni.Index.SpaceType
-
Cosine distance; i.e.
D
- distances - Variable in class com.spotify.voyager.jni.Index.QueryResults
-
A list of distances from each item ID to the query vector for this query.
E
- E4M3 - Enum constant in enum com.spotify.voyager.jni.Index.StorageDataType
-
A custom 8-bit floating point data type with range [-448, 448] and variable precision.
- Euclidean - Enum constant in enum com.spotify.voyager.jni.Index.SpaceType
-
Euclidean distance, also known as
L2
distance. - extractBinaries(String) - Static method in class com.spotify.voyager.jni.utils.JniLibExtractor
F
- finalize() - Method in class com.spotify.voyager.jni.Index
- Float32 - Enum constant in enum com.spotify.voyager.jni.Index.StorageDataType
-
A 32-bit floating point ("Float") data type.
- Float8 - Enum constant in enum com.spotify.voyager.jni.Index.StorageDataType
-
An 8-bit floating point data type that expects all values to be on [-1, 1].
G
- getDistance(int) - Method in class com.spotify.voyager.jni.StringIndex.QueryResults
- getDistances() - Method in class com.spotify.voyager.jni.Index.QueryResults
-
Retrieve the list of distances between query vectors and item vectors for the results of this query.
- getDistances() - Method in class com.spotify.voyager.jni.StringIndex.QueryResults
- getEf() - Method in class com.spotify.voyager.jni.Index
-
Get the default EF ("query search depth") that will be uses when
Index.query(float[], int)
is called. - getEfConstruction() - Method in class com.spotify.voyager.jni.Index
-
Get the EF Construction value used when adding new elements to this
Index
. - getIDs() - Method in class com.spotify.voyager.jni.Index
-
Get the list of identifiers currently stored by this index.
- getLabels() - Method in class com.spotify.voyager.jni.Index.QueryResults
-
Retrieve the list of item IDs ("labels") returned by this query.
- getM() - Method in class com.spotify.voyager.jni.Index
-
Get the M value used when adding new elements to this
Index
. - getMaxElements() - Method in class com.spotify.voyager.jni.Index
-
Get the maximum number of elements currently storable by this
Index
. - getMaxElements() - Method in class com.spotify.voyager.jni.StringIndex
-
Get the maximum number of elements currently storable by this
Index
. - getName(int) - Method in class com.spotify.voyager.jni.StringIndex.QueryResults
- getNames() - Method in class com.spotify.voyager.jni.StringIndex.QueryResults
- getNumDimensions() - Method in class com.spotify.voyager.jni.Index
-
Get the number of dimensions used in this
Index
. - getNumElements() - Method in class com.spotify.voyager.jni.Index
-
Get the number of elements currently in this
Index
. - getNumElements() - Method in class com.spotify.voyager.jni.StringIndex
- getNumResults() - Method in class com.spotify.voyager.jni.StringIndex.QueryResults
- getNumThreads() - Method in class com.spotify.voyager.jni.Index
-
Get the default number of threads used when adding multiple vectors in bulk oor when querying for multiple vectors simultaneously.
- getSpace() - Method in class com.spotify.voyager.jni.Index
-
Get the
Index.SpaceType
that thisIndex
uses to store and compare vectors. - getVector(long) - Method in class com.spotify.voyager.jni.Index
-
Get the vector for the provided identifier.
- getVector(String) - Method in class com.spotify.voyager.jni.StringIndex
- getVectors(long[]) - Method in class com.spotify.voyager.jni.Index
-
Get the vectors for a provided array of identifiers.
I
- Index - Class in com.spotify.voyager.jni
-
A Voyager index, providing storage of floating-point vectors and the ability to efficiently search among those vectors.
- Index(Index.SpaceType, int) - Constructor for class com.spotify.voyager.jni.Index
-
Create a new
Index
that uses the givenIndex.SpaceType
to store and comparenumDimensions
-dimensional vectors. - Index(Index.SpaceType, int, long, long, long, long, Index.StorageDataType) - Constructor for class com.spotify.voyager.jni.Index
-
Create a new
Index
that uses the givenIndex.SpaceType
to store and comparenumDimensions
-dimensional vectors. - Index.QueryResults - Class in com.spotify.voyager.jni
-
A container for query results, returned by Index.
- Index.SpaceType - Enum in com.spotify.voyager.jni
-
The space, also known as distance metric, to use when searching.
- Index.StorageDataType - Enum in com.spotify.voyager.jni
-
The datatype used to use when storing vectors on disk.
- InnerProduct - Enum constant in enum com.spotify.voyager.jni.Index.SpaceType
-
Inner (dot) product.
J
- JniLibExtractor - Class in com.spotify.voyager.jni.utils
- JniLibExtractor() - Constructor for class com.spotify.voyager.jni.utils.JniLibExtractor
L
- labels - Variable in class com.spotify.voyager.jni.Index.QueryResults
-
A list of item IDs ("labels").
- load(InputStream) - Static method in class com.spotify.voyager.jni.Index
-
Interpret the contents of a
java.io.InputStream
as the contents of a Voyager index file and create a newIndex
initialized with the data provided by that stream. - load(InputStream, Index.SpaceType, int, Index.StorageDataType) - Static method in class com.spotify.voyager.jni.Index
-
Interpret the contents of a
java.io.InputStream
as the contents of a Voyager index file and create a newIndex
initialized with the data provided by that stream. - load(InputStream, InputStream) - Static method in class com.spotify.voyager.jni.StringIndex
-
Load a previously constructed index from the provided input stream.
- load(InputStream, InputStream, Index.SpaceType, int, Index.StorageDataType) - Static method in class com.spotify.voyager.jni.StringIndex
-
Load a previously constructed index from the provided input streams.
- load(String) - Static method in class com.spotify.voyager.jni.Index
-
Load a Voyager index file and create a new
Index
initialized with the data in that file. - load(String, Index.SpaceType, int, Index.StorageDataType) - Static method in class com.spotify.voyager.jni.Index
-
Load a Voyager index file and create a new
Index
initialized with the data in that file. - load(String, String) - Static method in class com.spotify.voyager.jni.StringIndex
-
Load a previously constructed index from the provided file location.
- load(String, String, Index.SpaceType, int, Index.StorageDataType) - Static method in class com.spotify.voyager.jni.StringIndex
-
Load a previously constructed index from the provided file location.
M
- markDeleted(long) - Method in class com.spotify.voyager.jni.Index
-
Mark an element of the index as deleted.
Q
- query(float[][], int, int) - Method in class com.spotify.voyager.jni.Index
-
Query this
Index
for approximate nearest neighbors of multiple query vectors. - query(float[][], int, int, int) - Method in class com.spotify.voyager.jni.StringIndex
-
Query for multiple target vectors in parallel.
- query(float[][], int, int, long) - Method in class com.spotify.voyager.jni.Index
-
Query this
Index
for approximate nearest neighbors of multiple query vectors. - query(float[], int) - Method in class com.spotify.voyager.jni.Index
-
Query this
Index
for approximate nearest neighbors of a single query vector. - query(float[], int, int) - Method in class com.spotify.voyager.jni.StringIndex
-
Find the nearest neighbors of the provided embedding.
- query(float[], int, long) - Method in class com.spotify.voyager.jni.Index
-
Query this
Index
for approximate nearest neighbors of a single query vector. - QueryResults(long[], float[]) - Constructor for class com.spotify.voyager.jni.Index.QueryResults
-
Instantiates a new QueryResults object, provided two identical-length arrays of labels and their corresponding distances.
- QueryResults(String[], float[]) - Constructor for class com.spotify.voyager.jni.StringIndex.QueryResults
R
- readStringList(InputStream) - Static method in class com.spotify.voyager.jni.utils.TinyJson
- RecallException - Exception in com.spotify.voyager.jni.exception
-
An exception indicating that the desired recall of a query cannot be achieved
- RecallException(String) - Constructor for exception com.spotify.voyager.jni.exception.RecallException
-
Constructs a new RecallException with the specified detail message.
- RecallException(String, Throwable) - Constructor for exception com.spotify.voyager.jni.exception.RecallException
-
Constructs a new RecallException with the specified detail message and cause.
- resizeIndex(long) - Method in class com.spotify.voyager.jni.Index
-
Change the maximum number of elements currently storable by this
Index
. - resizeIndex(long) - Method in class com.spotify.voyager.jni.StringIndex
-
Change the maximum number of elements currently storable by this
Index
.
S
- saveIndex(OutputStream) - Method in class com.spotify.voyager.jni.Index
-
Save this Index to the provided output stream.
- saveIndex(OutputStream, OutputStream) - Method in class com.spotify.voyager.jni.StringIndex
-
Save the underlying HNSW index and JSON encoded names list to the provided output streams
- saveIndex(String) - Method in class com.spotify.voyager.jni.Index
-
Save this Index to a file at the provided filename.
- saveIndex(String) - Method in class com.spotify.voyager.jni.StringIndex
-
Save the underlying index and JSON encoded name list to the provided output directory
- saveIndex(String, String, String) - Method in class com.spotify.voyager.jni.StringIndex
- setEf(long) - Method in class com.spotify.voyager.jni.Index
-
Set the default EF ("query search depth") to use when
Index.query(float[], int)
is called. - setNumThreads(int) - Method in class com.spotify.voyager.jni.Index
-
Set the default number of threads to use when adding multiple vectors in bulk, or when querying for multiple vectors simultaneously.
- StringIndex - Class in com.spotify.voyager.jni
-
Wrapper around com.spotify.voyager.jni.Index with a simplified interface which maps the index ID to a provided String.
- StringIndex(Index.SpaceType, int) - Constructor for class com.spotify.voyager.jni.StringIndex
-
Instantiate a new empty index with the specified space type and dimensionality
- StringIndex(Index.SpaceType, int, long, long, long, long, Index.StorageDataType) - Constructor for class com.spotify.voyager.jni.StringIndex
-
Instantiate an empty index with the specified index parameters
- StringIndex.QueryResults - Class in com.spotify.voyager.jni
-
A wrapper class for nearest neighbor query results.
T
- TinyJson - Class in com.spotify.voyager.jni.utils
-
A dependency-free, super tiny JSON serde class that only supports reading and writing lists of strings.
- TinyJson() - Constructor for class com.spotify.voyager.jni.utils.TinyJson
- toString() - Method in class com.spotify.voyager.jni.Index.QueryResults
- toString() - Method in class com.spotify.voyager.jni.StringIndex.QueryResults
U
- unmarkDeleted(long) - Method in class com.spotify.voyager.jni.Index
-
Un-mark an element of the index as deleted, making it available again.
V
- valueOf(String) - Static method in enum com.spotify.voyager.jni.Index.SpaceType
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum com.spotify.voyager.jni.Index.StorageDataType
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum com.spotify.voyager.jni.Index.SpaceType
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.spotify.voyager.jni.Index.StorageDataType
-
Returns an array containing the constants of this enum type, in the order they are declared.
W
- writeStringList(Iterable<String>, OutputStream) - Static method in class com.spotify.voyager.jni.utils.TinyJson
All Classes and Interfaces|All Packages|Serialized Form