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 }); } }
public override List<SkinnyItem> GetItems(string databaseName, string indexName, string language, string templateFilter, string locationFilter, string fullTextQuery) { var searchParam = new SearchParam { Database = databaseName, Language = language, TemplateIds = templateFilter, LocationIds = locationFilter, FullTextQuery = fullTextQuery }; using (var runner = new QueryRunner(indexName)) { return runner.GetItems(searchParam, sortField:SortFieldName, reverse:Reverse); } }