public SearchFacetInfo(SearchResponse.FacetFields facetFields) { for (int i = 0; i < facetFields.itemType.Count; i += 2) { SearchItemType itemType = SearchItemTypeEnumExtensions.FromSearchQueryTerm((string)facetFields.itemType[i]); long count = (long)facetFields.itemType[i + 1]; ItemType.Add(itemType, (int)count); } ConvertListToMap(facetFields.productType, ProductType); ConvertListToMap(facetFields.mission, Mission); ConvertListToMap(facetFields.instrument, Instrument); }