/// <summary>
        /// 直播扩展搜索
        /// </summary>
        public static LuceneResultNode LiveSearchEx(LiveSearchFilter filter, string[] searchFields, string query, bool isNoPaging)
        {
            var fkey           = new VideoNodeKey(filter.platform, 0, filter.auth);
            var containfilters = new List <ContainFilterNode>();
            var fbname         = string.Empty;

            if (filter.forbidden)
            {
                filter.forbidden = VideoNodeKeyArray.Instance.Forbidden[fkey];
                if (filter.forbidden)
                {
                    if (ForbiddenAreaCache.Instance.Items.ContainsKey(filter.fbcode))
                    {
                        fbname = ForbiddenAreaCache.Instance.Items[filter.fbcode].ForbiddenAreaName;
                    }
                    else
                    {
                        filter.forbidden = false;
                    }
                }
            }
            if (filter.forbidden)
            {
                containfilters.Add(new ContainFilterNode()
                {
                    FieldName = LiveEpgNode.ForbiddenCode, Text = fbname.ToLower()
                });
            }
            var pindx = VideoNodeKeyArray.Instance.Items[fkey].ToString();

            containfilters.Add(new ContainFilterNode()
            {
                FieldName = LiveEpgNode.PlatformIndex, Text = pindx
            });
            if (!string.IsNullOrEmpty(filter.flag))
            {
                containfilters.Add(new ContainFilterNode()
                {
                    FieldName = LiveEpgNode.Flags, Text = VideoParsUtils.OrderAscFlags(filter.flag)
                });
            }
            if (filter.ver <= 1)
            {
                containfilters.Add(new ContainFilterNode()
                {
                    FieldName = LiveEpgNode.TableType, Text = "0"
                });
            }
            else
            {
                containfilters.Add(new ContainFilterNode()
                {
                    FieldName = LiveEpgNode.IsGroup, Text = "0"
                });
            }
            if (filter.forbidvip == 1)
            {
                containfilters.Add(new ContainFilterNode()
                {
                    FieldName = LiveEpgNode.VipFlag, Text = "0"
                });
            }
            List <LongRangeNode> longs = new List <LongRangeNode>();

            if (filter.lastday != 0)
            {
                longs.Add(new LongRangeNode()
                {
                    FieldName = LiveEpgNode.ParadeBeginTime, MinValue = 0, MaxValue = filter.lastday
                });
            }
            List <NumberRangeNode> rangenodes = new List <NumberRangeNode>();

            if (filter.bitratemin != 0 || filter.bitratemax != 0)
            {
                if (filter.bitratemax == 0)
                {
                    filter.bitratemax = int.MaxValue;
                }
                rangenodes.Add(new NumberRangeNode()
                {
                    FieldName = LiveEpgNode.BitrateRange, MinValue = filter.bitratemin, MaxValue = filter.bitratemax
                });
            }
            if (filter.hmin != 0 || filter.hmax != 0)
            {
                if (filter.hmax == 0)
                {
                    filter.hmax = int.MaxValue;
                }
                rangenodes.Add(new NumberRangeNode()
                {
                    FieldName = LiveEpgNode.HightRange, MinValue = filter.hmin, MaxValue = filter.hmax
                });
            }
            if (filter.wmin != 0 || filter.wmax != 0)
            {
                if (filter.wmax == 0)
                {
                    filter.wmax = int.MaxValue;
                }
                rangenodes.Add(new NumberRangeNode()
                {
                    FieldName = LiveEpgNode.WidthRange, MinValue = filter.wmin, MaxValue = filter.wmax
                });
            }
            SearchNode node = new SearchNode();

            node.Key               = filter.k;
            node.Pindex            = pindx;
            node.Queries           = query;//Searcher.SegmentKeyWord(filter.k);
            node.Fields            = searchFields;
            node.Occurs            = LiveEpgNode.Occurs;
            node.LongRnageFilters  = longs;
            node.ContainFilters    = containfilters;
            node.NumberRangeFiters = rangenodes;
            node.Start             = filter.s;
            node.Limit             = filter.c;
            node.IsNoPaging        = isNoPaging;
            node.IndexValue        = LiveEpgNode.IndexValue;
            return(Searcher.SearchEx(LiveEpgLuceneNet.Instance.IndexDic, node));
        }
        /// <summary>
        /// 点播基本搜索
        /// </summary>
        public static LuceneResultNode Search(ListFilter filter, string[] fields, Lucene.Net.Search.BooleanClause.Occur[] occurs, string query, bool isStat)
        {
            var fkey           = new VideoNodeKey(filter.platform, 0, filter.auth);
            var containfilters = new List <ContainFilterNode>();
            var fbname         = string.Empty;

            if (filter.forbidden)
            {
                filter.forbidden = VideoNodeKeyArray.Instance.Forbidden[fkey];
                if (filter.forbidden)
                {
                    if (ForbiddenAreaCache.Instance.Items.ContainsKey(filter.fbcode))
                    {
                        fbname = ForbiddenAreaCache.Instance.Items[filter.fbcode].ForbiddenAreaName;
                    }
                    else
                    {
                        filter.forbidden = false;
                    }
                }
            }
            if (filter.forbidden)
            {
                containfilters.Add(new ContainFilterNode()
                {
                    FieldName = EpgIndexNode.ForbiddenCode, Text = fbname.ToLower()
                });
            }
            var pindx = VideoNodeKeyArray.Instance.Items[fkey].ToString();

            containfilters.Add(new ContainFilterNode()
            {
                FieldName = EpgIndexNode.PlatformIndex, Text = pindx
            });
            if (!string.IsNullOrEmpty(filter.flag))
            {
                containfilters.Add(new ContainFilterNode()
                {
                    FieldName = EpgIndexNode.Flags, Text = VideoParsUtils.OrderAscFlags(filter.flag)
                });
            }
            if (filter.ver <= 1)
            {
                containfilters.Add(new ContainFilterNode()
                {
                    FieldName = EpgIndexNode.TableType, Text = "0"
                });
            }
            else
            {
                if (filter.screen == "v")
                {
                    containfilters.Add(new ContainFilterNode()
                    {
                        FieldName = EpgIndexNode.IsGroup, Text = "0"
                    });
                }
                else
                {
                    containfilters.Add(new ContainFilterNode()
                    {
                        FieldName = EpgIndexNode.Screen, Text = "0"
                    });
                    containfilters.Add(new ContainFilterNode()
                    {
                        FieldName = EpgIndexNode.IsGroup, Text = "0"
                    });
                }
            }
            //if (filter.type != 0)
            //{
            //    containfilters.Add(new ContainFilterNode() { FieldName = EpgIndexNode.Type, Text = filter.type.ToString() });
            //}
            var node = new SearchNode();

            node.Key     = filter.k;
            node.Pindex  = pindx;
            node.Queries = query;//Searcher.SegmentKeyWord(filter.k);
            node.Fields  = fields;
            node.Occurs  = occurs;
            //node.SortFields = EpgIndexNode.SortFields;
            node.ContainFilters   = containfilters;
            node.LongRnageFilters = new List <LongRangeNode>();
            node.Start            = filter.s;
            node.Limit            = filter.c;
            node.IndexValue       = EpgIndexNode.IndexValue;
            node.IsStat           = isStat;
            node.VodType          = filter.type;
            node.ShowNav          = filter.shownav;
            node.TotalTypes       = BoxTypeCache.Instance.Items.Count;
            return(Searcher.Search(EpgLuceneNet.Instance.IndexDic, node));
        }