public SearchResult(Guid resourceId, string name, string path, SearchItemType type, string match) { ResourceId = resourceId; Name = name; Path = path; Type = type; Match = match; }
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); }
/// <summary> /// Gets the string representation of the item type that is used /// in the search query. Does not work for compound item types. /// </summary> public static string GetSearchQueryTerm(this SearchItemType itemType) { return(StringUtils.FirstCharacterToLower(itemType.ToString())); }
private static void AddRecordsetResult(ISearch searchParameters, List <ISearchResult> searchResults, IResource resource, enDev2ColumnArgumentDirection type, SearchItemType option) { var variableList = resource.DataList.Replace(GlobalConstants.SerializableResourceQuote, "\"").Replace(GlobalConstants.SerializableResourceSingleQuote, "\'").ToString(); var variableDefinitions = DataListUtil.GenerateDefsFromDataList(variableList, type, true, searchParameters); var matchingRecordsets = variableDefinitions.Where(v => v.IsRecordSet); foreach (var recordset in matchingRecordsets) { var searchResult = new SearchResult(resource.ResourceID, resource.ResourceName, resource.GetResourcePath(GlobalConstants.ServerWorkspaceID), option, recordset.RecordSetName); searchResults.Add(searchResult); } }
public SearchItemArgs(string value, SearchItemType type) { Value = value; Type = type; }