コード例 #1
0
        public override List<SkinnyItem> GetItems(string databaseName,
                                                string indexName,
                                                string language,
                                                string templateFilter,
                                                bool searchBaseTemplates,
                                                string locationFilter,
                                                string fullTextQuery)
        {
            var searchParam = new NumericRangeSearchParam
                              {
                                 Database = databaseName,
                                 Ranges = NumericRanges,
                                 LocationIds = locationFilter,
                                 TemplateIds = templateFilter,
                                 SearchBaseTemplates = searchBaseTemplates,
                                 FullTextQuery = fullTextQuery,
                                 InnerCondition = GetCondition(InnerNumericRangeConditionList),
                                 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 refinements = GetRefinements();

            var searchParam = new MultiFieldSearchParam
                                 {
                                     Database = databaseName,
                                     Refinements = refinements,
                                     InnerCondition = GetCondition(OccuranceList),
                                     LocationIds = locationFilter,
                                     TemplateIds = templateFilter,
                                     FullTextQuery = fullTextQuery,
                                     Language = language
                                 };

            using (var runner = new QueryRunner(indexName))
            {
                return runner.GetItems(searchParam);
            }
        }
コード例 #3
0
        public override List<SkinnyItem> GetItems(string databaseName,
                                                  string indexName,
                                                  string language,
                                                  string templateFilter,
                                                  bool searchBaseTemplates,
                                                  string locationFilter,
                                                  string fullTextQuery)
        {
            var searchParam = new FieldSearchParam
            {
                Database = databaseName,
                Language = language,
                FieldName = this.FieldName.Text,
                FieldValue = this.FieldValue.Text,
                TemplateIds = templateFilter,
                SearchBaseTemplates = searchBaseTemplates,
                LocationIds = locationFilter,
                FullTextQuery = fullTextQuery,
                Partial = this.Partial.Checked
            };

            using (var runner = new QueryRunner(indexName))
            {
                return runner.GetItems(searchParam);
            }
        }
コード例 #4
0
        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);
            }
        }
        public override List<SkinnyItem> GetItems(string databaseName,
                                                  string indexName,
                                                  string language,
                                                  string templateFilter,
                                                  bool searchBaseTemplates,
                                                  string locationFilter,
                                                  string fullTextQuery)
        {
            var searchParam1 = new SearchParam
            {
                Database = databaseName,
                Language = language,
                TemplateIds = templateFilter,
                SearchBaseTemplates = searchBaseTemplates,
                LocationIds = locationFilter,
                FullTextQuery = fullTextQuery,
                Condition = this.GetCondition(this.BaseConditionList)
            };

            var searchParam2 = new FieldSearchParam
            {
                FieldName = this.Field1Name.Text,
                FieldValue = this.Field1Value.Text,
                Partial = this.Partial1.Checked,
                Condition = this.GetCondition(this.FieldSearchParameter1ConditionList)
            };

            var searchParam3 = new FieldSearchParam
            {
                FieldName = this.Field2Name.Text,
                FieldValue = this.Field2Value.Text,
                Partial = this.Partial2.Checked,
                Condition = this.GetCondition(this.FieldSearchParameter2ConditionList)
            };

            using (var runner = new QueryRunner(indexName))
            {
                return runner.GetItems(new [] { searchParam1, searchParam2, searchParam3 });
            }
        }
コード例 #6
0
        public override List<SkinnyItem> GetItems(string databaseName,
                                                string indexName,
                                                string language,
                                                string templateFilter,
                                                bool searchBaseTemplates,
                                                string locationFilter,
                                                string fullTextQuery)
        {
            var searchParam = new SearchParam
                                {
                                 Database = databaseName,
                                 Language = language,
                                 TemplateIds = templateFilter,
                                 LocationIds = locationFilter,
                                 FullTextQuery = fullTextQuery,
                                 SearchBaseTemplates = searchBaseTemplates
                              };

             using (var runner = new QueryRunner(indexName))
             {
            return runner.GetItems(searchParam);
             }
        }
コード例 #7
0
        public override List<SkinnyItem> GetItems(string databaseName,
                                                  string indexName,
                                                  string language,
                                                  string templateFilter,
                                                  bool searchBaseTemplates,
                                                  string locationFilter,
                                                  string fullTextQuery)
        {
            var baseCondition = GetCondition(this.BaseConditionList);
            var outerNumParamParamCondition = GetCondition(this.InnerNumericRangeConditionList);
            var outerDateParamCondition = GetCondition(this.InnerDateRangeConditionList);
            var innerNumParamParamCondition = GetCondition(this.InnerNumericRangeConditionList);
            var innerDateParamCondition = GetCondition(this.InnerDateRangeConditionList);

            var parameters = new List<SearchParam>
                                 {
                                     new SearchParam
                                         {
                                             Database = databaseName,
                                             LocationIds = locationFilter,
                                             TemplateIds = templateFilter,
                                             SearchBaseTemplates = searchBaseTemplates,
                                             FullTextQuery = fullTextQuery,
                                             Language = language,
                                             Condition = baseCondition
                                         },
                                     new NumericRangeSearchParam
                                         {
                                             Ranges = this.NumericRanges,
                                             InnerCondition =
                                                 innerNumParamParamCondition,
                                             Condition =
                                                 outerNumParamParamCondition
                                         },
                                     new DateRangeSearchParam
                                         {
                                             Ranges = this.DateRanges,
                                             InnerCondition =
                                                 innerDateParamCondition,
                                             Condition = outerDateParamCondition
                                         }
                                 };

            using (var runner = new QueryRunner(indexName))
            {
                return runner.GetItems(parameters);
            }
        }
コード例 #8
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 });
            }
        }