예제 #1
0
        /// <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);
        }
예제 #2
0
 /// <summary>
 /// 删除索引
 /// </summary>
 /// <param name="photo">待删除的Photo</param>
 public void Delete(Photo photo)
 {
     searchEngine.Delete(photo.PhotoId.ToString(), PhotoIndexDocument.PhotoId);
 }
예제 #3
0
 /// <summary>
 /// 添加索引
 /// </summary>
 /// <param name="photo">待添加的索引</param>
 public void Insert(Photo photo)
 {
     Insert(new Photo[] { photo });
 }