Called periodically to report on progress during indexing.
Called periodically to report on progress during indexing. The first argument is the number of records processed. The second argument is the total number of record to index as part of this operation.
Add a new item to the index.
Add a new item to the index. If the item already exists in the index the old item will first be removed from the index. for this removes need to be enabled for 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
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 neighbors of
number of neighbors 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.