Hi,
We have a web site that has the following folder hierarchy:
home
home\locations\dtc
home\locations\denver
The corresponding web site URLs for the above folders are:
http://www.homepage.com
http://www.homepage.com/locations/dtc
http://www.homepage.com/locations/denver
The "home" folder hosts pages for the site at the "home" level.
"dtc" is the name of a location, and therefore the "dtc" folder hosts pages/content for the "dtc" location.
"denver" is the name of a location, and therefore the "dtc" folder hosts
pages/content for the "dtc" location.
I want to enable Search functionality at all 3 levels listed above.
So I created 3 Search Indexes under the SiteFinity "Administration" module.
The Search Indexes and their settings are listed below:
EntireSite - this is for the "home" site
Settings for "EntireSite" search index are:
PageIndex
Auto index: False
Index non-public pages: False
Starting node URL: All Pages
dtc - this is search index for the "dtc" site
PageIndex
Auto index: False
Index non-public pages: False
Starting node URL: ~/locations/dtc.aspx
denver - this is search index for the "denver" site
PageIndex
Auto index: False
Index non-public pages: False
Starting node URL: ~/locations/denver.aspx
And when I clicked on "Start Indexing" it is able to index the content, because I see something like this in the "Index Status" column. So the Search is working:
Index status
- Indexed words: 66
- Indexed pages: 78
- Last indexing date: 17 Jul 2008, 02:50
And in the code-behind in the MasterPage that is referenced by the web pages, I have the following code:
| <%@ Master Language="C#" %> |
| <%@ Register Src="../Controls/TopNav.ascx" TagName="TopNav" TagPrefix="uc1" %> |
| <%@ Register Src="../Controls/Footer.ascx" TagName="Footer" TagPrefix="uc2" %> |
| <%@ Register Src="../Controls/Footer2.ascx" TagName="Footer2" TagPrefix="uc3" %> |
| <%@ Register Src="../Controls/LeftNav.ascx" TagName="LeftNav" TagPrefix="uc4" %> |
| <%@ Register tagprefix="cc" namespace="Telerik.Search.WebControls" assembly="Telerik.Search" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| |
| <script runat="server"> |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| string CurClub = ""; |
| |
| if(SiteMap.CurrentNode.Url.Contains("/locations/")) |
| { |
| CurClub = SiteMap.CurrentNode.Url.ToString(); |
| CurClubCurClub = CurClub.Replace("~/locations", ""); |
| CurClubCurClub = CurClub.Remove(0, 1); |
| CurClubCurClub = CurClub.Replace(".aspx", ""); |
| CurClubCurClub = CurClub.Substring(0, CurClub.IndexOf("/")); |
| } |
| |
| |
| if(CurClub == "dtc") |
| { |
| SearchBox1.EnableViewState = false; |
| SearchBox1.IndexCatalogue = "dtc"; |
| SearchBox1.ResultUrl = "/locations/dtc/results.aspx"; |
| } |
| else if(CurClub == "denver") |
| { |
| SearchBox1.EnableViewState = false; |
| SearchBox1.IndexCatalogue = "denver"; |
| SearchBox1.ResultUrl = "/locations/denver/results.aspx"; |
| } |
| else |
| { |
| SearchBox1.EnableViewState = false; |
| SearchBox1.IndexCatalogue = "EntireSite"; |
| SearchBox1.ResultUrl = "~/results.aspx"; |
| |
| } |
| |
| } |
| |
| </script> |
| |
| |
But when I attempt to search for content in the web pages, I get 0 results. I get no results at the "home" or the "dtc" or the "denver" levels. It comes back with 0 results everywhere.
I am seeing the following search index related errors in the SiteFinity.log. Shown below is the error that I am getting for the "dtc" site. I also see the same type of error for the "denver" site.
7/17/2008 10:25:08 AM [EXCEPTION]
************************************************************************************
ID: 2e294c53-141c-4449-8659-5ddc44171337; Code: 100103; Occurrence: 6; Sequence: 27
------------------------------------------------------------------------------------
Application information:
Machine name: WBW23WELBDG001
OS Version: Microsoft Windows NT 5.2.3790 Service Pack 2
Product Version: 3.2.1598.1
Application Path: C:\WEBSITES\ColoradoAthleticClub\
Debug: True
Process information:
Process ID: 6392
Process Name: w3wp
Request information:
Request URL: /Sitefinity/Admin/CmsAdmin/Services.aspx
Rewrite URL: http://cac.revereserviceportal.com/Sitefinity/Admin/CmsAdmin/Services.aspx
Url Referrer: http://cac.revereserviceportal.com/Sitefinity/Admin/CmsAdmin/Services.aspx
Is Authenticated: True
Authentication Type: Forms
User: admin
User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)
User Address: 192.168.50.63
Variables:
AspSession: System.Web.SessionState.HttpSessionState
SF_Crawler: True
cmscurrcult:
cmspageid: f7581d54-cd6f-4f18-acbc-926e4ab2e83d
RadControlRandomNumber: 0
AspSessionIDManagerInitializeRequestCalled: True
- L0 -------------------------------------------------------------------------------
Exception Type: Telerik.Framework.Search.IndexExcepton
Message: An error has occurred while indexing the following document: "~/locations/DTC/results.aspx". Please see inner exception for more details.
Source:
Stack Trace:
------------------------------------------------------------------------------------
- L1 -------------------------------------------------------------------------------
Exception Type: System.Web.HttpException
Message: Error executing child request for /sitefinity/cmsentrypoint.aspx.
Source: System.Web
Stack Trace:
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
at System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean preserveForm)
at Telerik.Cms.Search.PageIndexerInfo.GetInternalPageData()
------------------------------------------------------------------------------------
- L2 -------------------------------------------------------------------------------
Exception Type: System.Web.HttpUnhandledException
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source: System.Web
Stack Trace:
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.sitefinity_cmsentrypoint_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
------------------------------------------------------------------------------------
- L3 -------------------------------------------------------------------------------
Exception Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: App_Web_5yiwwcro
Stack Trace:
at ASP.app_master_contentpage_master.Page_PreRender(Object sender, EventArgs e) in c:\WEBSITES\ColoradoAthleticClub\App_Master\ContentPage.master:line 14
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
------------------------------------------------------------------------------------
What am I missing?
Also, it appears that the Search is only able to index content up to a certain level. Is there a way to specify the number of levels that must be indexed?
Thanks in advance for your help.
Best regards,
Kiran