public override ISearchResults Execute(int maxResults = 500) { _request.BrowseRequest.Count = maxResults; _request.BrowseRequest.Sort = SortFields.ToArray(); return(new BoboFacetSearchResults(_searchContext, _request)); }
private string GetUniqueCode() { //Return code specific for this list for assembly cache return(string.Format("f[{0}]s[{1}]", ShouldFilter() ? FilterBy : string.Empty, ShouldSort() ? string.Join(",", SortFields.ToArray()) : string.Empty ).ToLowerInvariant()); }
private BoboFacetRequest BuildRequest(int maxResults) { var request = new BoboFacetRequest { BrowseRequest = new BrowseRequest { Query = Query, Sort = SortFields.ToArray(), Count = maxResults, FetchStoredFields = true }, FacetHandlers = new List <IFacetHandler>() }; foreach (var field in Fields) { var spec = new FacetSpec() { MinHitCount = field.MinHits, MaxCount = field.MaxCount }; request.BrowseRequest.SetFacetSpec(field.Name, spec); if (field.Values != null) { request.BrowseRequest.AddSelection(new BrowseSelection(field.Name) { Values = field.Values }); } request.FacetHandlers.Add(new MultiValueFacetHandler(field.Name)); } return(request); }