public Get_Search_Results ( |
||
Current_Mode | Mode / navigation information for the current request | |
All_Items_Lookup | SobekCM.Engine_Library.ApplicationState.Item_Lookup_Object | Lookup object used to pull basic information about any item loaded into this library |
Aggregation_Object | Object for the current aggregation object, against which this search is performed | |
Search_Stop_Words | List |
List of search stop workds |
Tracer | Custom_Tracer | Trace object keeps a list of each method executed and important milestones in rendering |
Complete_Result_Set_Info | SobekCM.Core.Results.Search_Results_Statistics | [OUT] Information about the entire set of results |
Paged_Results | List |
[OUT] List of search results for the requested page of results |
return | void |
private void Search_Block() { tracer.Add_Trace("SobekCM_Page_Globals.Search_Block", "Retreiving search results"); try { // If there is no search term, forward back to the collection if ((currentMode.Search_String.Length == 0) && (currentMode.Coordinates.Length == 0)) { currentMode.Mode = Display_Mode_Enum.Aggregation; currentMode.Aggregation_Type = Aggregation_Type_Enum.Home; currentMode.Redirect(); return; } SobekCM_Assistant assistant = new SobekCM_Assistant(); assistant.Get_Search_Results(currentMode, Global.Item_List, hierarchyObject, tracer, out searchResultStatistics, out pagedSearchResults); if ((!currentMode.isPostBack) && (Global.Search_History != null)) { Global.Search_History.Add_New_Search(currentMode, HttpContext.Current.Request.UserHostAddress, currentMode.Search_Type, hierarchyObject.Name, currentMode.Search_String); } } catch (Exception ee) { currentMode.Mode = Display_Mode_Enum.Error; currentMode.Error_Message = "Unable to perform search at this time "; if (hierarchyObject == null) currentMode.Error_Message = "Unlable to perform search - hierarchyObject = null"; currentMode.Caught_Exception = ee; } }
private void Search_Block() { tracer.Add_Trace("SobekCM_Page_Globals.Search_Block", "Retreiving search results"); try { // If there is no search term, forward back to the collection if (( String.IsNullOrEmpty(currentMode.Search_String)) && ( String.IsNullOrEmpty(currentMode.Coordinates))) { currentMode.Mode = Display_Mode_Enum.Aggregation; currentMode.Aggregation_Type = Aggregation_Type_Enum.Home; UrlWriterHelper.Redirect(currentMode); return; } SobekCM_Assistant assistant = new SobekCM_Assistant(); assistant.Get_Search_Results(currentMode, UI_ApplicationCache_Gateway.Items, hierarchyObject, UI_ApplicationCache_Gateway.Search_Stop_Words, tracer, out searchResultStatistics, out pagedSearchResults); if ((!currentMode.isPostBack) && (UI_ApplicationCache_Gateway.Search_History != null)) { UI_ApplicationCache_Gateway.Search_History.Add_New_Search(Get_Search_From_Mode(currentMode, HttpContext.Current.Request.UserHostAddress, currentMode.Search_Type, hierarchyObject.Name, currentMode.Search_String )); } } catch (Exception ee) { currentMode.Mode = Display_Mode_Enum.Error; currentMode.Error_Message = "Unable to perform search at this time "; if (hierarchyObject == null) currentMode.Error_Message = "Unlable to perform search - hierarchyObject = null"; currentMode.Caught_Exception = ee; } }