public override List<SkinnyItem> GetItems(string databaseName,
                                                string indexName,
                                                string language,
                                                string templateFilter,
                                                bool searchBaseTemplates,
                                                string locationFilter,
                                                string fullTextQuery)
        {
            var searchParam = new DateRangeSearchParam
                              {
                                 Database = databaseName,
                                 Ranges = this.DateRanges,
                                 LocationIds = locationFilter,
                                 TemplateIds = templateFilter,
                                 SearchBaseTemplates = searchBaseTemplates,
                                 FullTextQuery = fullTextQuery,
                                 InnerCondition = GetCondition(InnerDateRangeConditionList),
                                 Language = language
                              };

             using (var runner = new QueryRunner(indexName))
             {
            return runner.GetItems(searchParam);
             }
        }
        private static Query BuildDateRangeQuery(DateRangeSearchParam.DateRange dateRange)
        {
            var startDateTime = dateRange.StartDate;
            var endDateTime = dateRange.EndDate;

            // converting to lucene format
            var startDate = DateTools.DateToString(startDateTime, DateTools.Resolution.DAY);
            var endDate = DateTools.DateToString(endDateTime, DateTools.Resolution.DAY);

            return new RangeQuery(new Term(dateRange.FieldName, startDate), new Term(dateRange.FieldName, endDate), true);
        }
        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 });
            }
        }