a.load(fn, prefault=False)下来模型进行计算,loads (mmaps) an index from disk. If prefault is set to True, it will pre-read the entire file into memory (using mmap with MAP_POPULATE). Default is False.
a.get_nns_by_item(i, n, search_k=-1, include_distances=False)使用item索引号进行计算,i表示item索引号, n表示计算要得到的最近邻的item个数
a.get_item_vector(i):返回之前添加的item索引号i所对应的向量
a.get_n_items() 返回整个索引树中item的数量
a.get_n_trees() 返回整个索引树中树的个数
a.get_nns_by_vector(v, n, search_k=-1, include_distances=False) 使用item向量v进行计算