getNearestToItem method
Get nearest items to the given item id
Implementation
AnnoyIndexSearchResult getNearestToItem(int itemId, int nResults,
{int searchK = -1, bool includeDistance = false}) {
final resultPtr = _factory._getNearestToItem(
_ptr, itemId, nResults, searchK, includeDistance ? 1 : 0);
try {
return AnnoyIndexSearchResult._create(
includeDistance, _factory, resultPtr);
} finally {
_factory._freeSearchResult(resultPtr);
}
}