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)); }
public virtual BooleanQuery ProcessQuery(QueryOccurance occurance, Index index) { var innerQuery = new CombinedQuery(); ApplyFullTextClause(innerQuery, FullTextQuery, occurance); ApplyRelationFilter(innerQuery, RelatedIds, occurance); ApplyTemplateFilter(innerQuery, TemplateIds, occurance); ApplyLocationFilter(innerQuery, LocationIds, occurance); AddFieldValueClause(innerQuery, BuiltinFields.Database, Database, occurance); if (innerQuery.Clauses.Count < 1) { return(null); } var translator = new QueryTranslator(index); var booleanQuery = translator.ConvertCombinedQuery(innerQuery); ApplyLanguageClause(booleanQuery, Language, translator.GetOccur(occurance)); return(booleanQuery); }
public override BooleanQuery ProcessQuery(QueryOccurance occurance, Index index) { var outerQuery = new BooleanQuery(); var refinementQuery = ApplyRefinements(Refinements, InnerCondition); var translator = new QueryTranslator(index); var refBooleanQuery = translator.ConvertCombinedQuery(refinementQuery); var outerOccurance = translator.GetOccur(occurance); if (refBooleanQuery != null && refBooleanQuery.Clauses().Count > 0) { outerQuery.Add(refBooleanQuery, outerOccurance); } var baseQuery = base.ProcessQuery(occurance, index); if (baseQuery != null) { outerQuery.Add(baseQuery, outerOccurance); } return(outerQuery); }