/// <summary> /// 更新索引 /// </summary> /// <param name="photo">要更新的Photo</param> public void Update(Photo photo) { Document doc = PhotoIndexDocument.Convert(photo); searchEngine.Update(doc, photo.PhotoId.ToString(), PhotoIndexDocument.PhotoId); }
/// <summary> /// 删除索引 /// </summary> /// <param name="photo">待删除的Photo</param> public void Delete(Photo photo) { searchEngine.Delete(photo.PhotoId.ToString(), PhotoIndexDocument.PhotoId); }
/// <summary> /// 添加索引 /// </summary> /// <param name="photo">待添加的索引</param> public void Insert(Photo photo) { Insert(new Photo[] { photo }); }