Пример #1
0
 public virtual List<SitecoreItem> RunQuery(QueryBase query, bool showAllVersions)
 {
     var translator = new QueryTranslator(Index);
      var luceneQuery = translator.Translate(query);
      return RunQuery(luceneQuery, showAllVersions);
 }
Пример #2
0
        public virtual List<SitecoreItem> GetItemsInRange(DateRangeSearchParam param)
        {
            var globalQuery = new CombinedQuery();

             ApplyLanguageClause(globalQuery, param.Language);
             ApplyTemplateFilter(globalQuery, param.TemplateIds);
             ApplyLocationFilter(globalQuery, param.LocationIds);
             ApplyFullTextClause(globalQuery, param.FullTextQuery);
             ApplyRelationFilter(globalQuery, param.RelatedIds);

             var translator = new QueryTranslator(Index);
             var booleanQuery = translator.ConvertCombinedQuery(globalQuery);
             var innerOccurance = translator.GetOccur(param.Occurance);

             ApplyDateRangeSearchParam(booleanQuery, param, innerOccurance);

             return RunQuery(booleanQuery, param.ShowAllVersions);
        }