Keyoti SearchUnit API Docs
ToURIPattern Property
API DocumentationKeyoti.SearchEngine.WebSearchResultToURIPattern
Keyoti SearchUnit v6
If necessary URLs in the results can be mapped to other domains/paths, specify the to match here, eg. http://www.domain.com
Declaration Syntax
C#Visual Basic
[PersistenceModeAttribute(PersistenceMode.Attribute)]
public virtual string ToURIPattern { get; set; }
<PersistenceModeAttribute(PersistenceMode.Attribute)> 
Public Overridable Property ToURIPattern As String
	Get
	Set
Property Value
String
Remarks
If an index is built against a web-site on localhost (or some other dev/staging server) for example then the URLs given in the search results will be incorrect when running in a production/live server environment. This simple mechanism allows results to be mapped from one URL to another.
Examples

Eg 1. A developer builds a web-site on http://localhost/internalApp/ and builds the search index - the search works fine on localhost, however when moving the app. to the live server the search results are linked to localhost. To correct this the developer maps the localhost URLs to the real server's, by setting:

 Copy imageCopy
FromURIPattern = "localhost/internalApp"
ToURIPattern = "ourcompanysinternalserver"
This causes URLs like http://localhost/internalApp/products/product1.aspx to be mapped to http://ourcompanysinternalserver/products/product1.aspx

Examples

Eg 2. A developer builds a web-site on http://staging.ourdomain.com/ and builds the search index - the search works fine on the staging server, however when moving the app. to the live server the search results are linked to staging.ourdomain.com. To correct this the developer maps the staging.ourdomain.com URLs to the real server's, by setting:

 Copy imageCopy
FromURIPattern = "staging.ourdomain.com"
ToURIPattern = "www.ourdomain.com"
This causes URLs like http://staging.ourdomain.com/default.aspx to be mapped to http://www.ourdomain.com/default.aspx

Assembly: Keyoti4.SearchEngine.Web (Module: Keyoti4.SearchEngine.Web.dll) Version: 2022.8.22.610