Add a new item to the index.
Add a new item to the index.
the item to add to the index
Add multiple items to the index.
Add multiple items to the index. Reports progress to the passed in progress listener every progressUpdateInterval elements indexed.
the items to add to the index
number of threads to use for parallel indexing
listener to report progress to
after indexing this many items progress will be reported
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
NoSuchElementException
when the item does not exist
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
Removes an item from the index.
Removes an item from the index.
unique identifier or the item to remove
true if this list contained the specified element
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
The type of items to connect into small world.
The type of distance between items (expect any numeric type: float, double, int, ..).
See neighbors algorithm for more information.