Exemple #1
0
 /// <summary>
 /// 频道名拼音扩展搜索
 /// </summary>
 public string VideoSearchCHEx(ListFilter filter)
 {
     try
     {
         return(CreateSmarkPageList(LuceneNetUtil.SearchEx(filter, EpgIndexNode.CnNameField, EpgIndexNode.NameOccurs, Searcher.SegmentChWord(filter.k), false), filter, VideoParsUtils.FormateSearchVideoPars(filter), true));
     }
     catch (KeyNotFoundException)
     {
         return(NoPlatForm());
     }
     catch (Exception ex)
     {
         return(BoxUtils.FormatErrorMsg(ex));
     }
 }
Exemple #2
0
 public string LiveSearchCh(LiveSearchFilter filter)
 {
     try
     {
         return(CreateSmarkPageList(LuceneNetUtil.LiveSearch(filter, LiveEpgNode.CnNameField, Searcher.SegmentChWord(filter.k), false), filter, false));
     }
     catch (KeyNotFoundException)
     {
         return(NoPlatForm());
     }
     catch (Exception ex)
     {
         return(BoxUtils.FormatErrorMsg(ex));
     }
 }
Exemple #3
0
 public string LiveParadeSearchEx(LiveSearchFilter filter)
 {
     try
     {
         return(CreateParadeSmarkPageList(LuceneNetUtil.LiveSearchEx(filter, LiveEpgNode.ParadeFields, Searcher.SegmentKeyWord(filter.k), true), filter, true));
     }
     catch (KeyNotFoundException)
     {
         return(NoPlatForm());
     }
     catch (Exception ex)
     {
         return(BoxUtils.FormatErrorMsg(ex));
     }
 }
Exemple #4
0
 public string TagSearchSmart(TagSearchFilter filter)
 {
     try
     {
         var xml   = new XElement("taglist");
         var count = LuceneNetUtil.TagSearch(filter, EpgIndexNode.NameField, Searcher.SegmentKeyWord(filter.k), xml);
         xml.AddFirst(new XElement("count", count), new XElement("page_count", PageUtils.PageCount(count, filter.c)));
         return(xml.ToString(SaveOptions.DisableFormatting));
     }
     catch (KeyNotFoundException)
     {
         return(NoPlatForm());
     }
     catch (Exception ex)
     {
         return(BoxUtils.FormatErrorMsg(ex));
     }
 }
Exemple #5
0
 public string RelevanceEx(RelevanceFilter filter)
 {
     try
     {
         var vids = filter.vids.FormatStrToArray(SplitArray.LineArray);
         int vid  = 0;
         if (int.TryParse(vids[0], out vid))
         {
             var video = ListCache.Instance.Dictionary[vid];
             return(CreateSmarkPageList(LuceneNetUtil.RelevanceSearchEx(filter, SegmentKeyWord(video), filter.c + 1), filter, VideoParsUtils.FormateSearchVideoPars(filter), true));
         }
         return(NoPlatForm());
     }
     catch (KeyNotFoundException)
     {
         return(NoPlatForm());
     }
     catch (Exception ex)
     {
         return(BoxUtils.FormatErrorMsg(ex));
     }
 }