Returns an item by its identifier.
Returns an item by its identifier. If the item does not exist in the index a NoSuchElementException is thrown
unique identifier of the item to return
the item
Find the items closest to the passed in vector.
Find the items closest to the passed in vector.
the vector
number of items to return
the items closest to the passed in vector
Find the items closest to the item identified by the passed in id.
Find the items closest to the item identified by the passed in id. If the id does not match an item an empty list is returned. the element itself is not included in the response.
of the item to find the neighbours of
number of neighbours to return
the items closest to the item
Optionally return an item by its identifier
Optionally return an item by its identifier
unique identifier of the item to return
the item
Saves the index to a path.
Saves the index to a path.
path to write the index to
Saves the index to a file.
Saves the index to a file.
file to write the index to
Saves the index to an OutputStream.
Saves the index to an OutputStream.
the output stream to write the index to
Returns the size of the index.
Returns the size of the index.
size of the index
K-nearest neighbours search index.
type of the external identifier of an item
The type of the vector to perform distance calculation on
Type of items stored in the index
The type of distance between items (expect any numeric type: float, double, int, ..).
See https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm for more information.