예제 #1
0
        public override List<SkinnyItem> GetItems(string databaseName,
            string indexName,
            string language,
            string templateFilter,
            string locationFilter,
            string fullTextQuery)
        {
            var searchParam = new DateRangeSearchParam
                              {
                                 Database = databaseName,
                                 Ranges = DateRanges,
                                 LocationIds = locationFilter,
                                 TemplateIds = templateFilter,
                                 FullTextQuery = fullTextQuery,
                                 InnerCondition = GetCondition(InnerDateRangeOccuranceList),
                                 Language = language
                              };

             using (var runner = new QueryRunner(indexName))
             {
            return runner.GetItems(searchParam);
             }
        }
예제 #2
0
        public override List<SkinnyItem> GetItems(string databaseName,
            string indexName,
            string language,
            string templateFilter,
            string locationFilter,
            string fullTextQuery)
        {
            var baseCondition = GetCondition(BaseOccuranceList);
            var outerNumParamParamCondition = GetCondition(NumericRangeOccuranceList);
            var outerDateParamCondition = GetCondition(DateRangeOccuranceList);
            var innerNumParamParamCondition = GetCondition(InnerNumericRangeOccuranceList);
            var innerDateParamCondition = GetCondition(InnerDateRangeOccuranceList);

            var baseSearchParam = new SearchParam
            {
                Database = databaseName,
                LocationIds = locationFilter,
                TemplateIds = templateFilter,
                FullTextQuery = fullTextQuery,
                Language = language,
                Condition = baseCondition
            };

            var numSearchParam = new NumericRangeSearchParam
            {
                Ranges = NumericRanges,
                InnerCondition = innerNumParamParamCondition,
                Condition = outerNumParamParamCondition
            };

            var dateSearchParam = new DateRangeSearchParam
               {
                   Ranges = DateRanges,
                   InnerCondition = innerDateParamCondition,
                   Condition = outerDateParamCondition
               };

            using (var runner = new QueryRunner(indexName))
            {
                return runner.GetItems(new[] { baseSearchParam, numSearchParam, dateSearchParam });
            }
        }