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

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

             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);
        }