Keyoti SearchUnit API Docs
FromURIPattern Property
API DocumentationKeyoti.SearchEngine.WebSearchResultFromURIPattern
Keyoti SearchUnit v6
If necessary URLs in the results can be mapped to other domains/paths, specify the from match here, eg. http://localhost
Declaration Syntax
C#C#Visual BasicVisual BasicVisual C++Visual C++F#F#
[PersistenceModeAttribute(PersistenceMode.Attribute)]
public virtual string FromURIPattern { get; set; }
[PersistenceModeAttribute(PersistenceMode.Attribute)]
public virtual string FromURIPattern { get; set; }
<PersistenceModeAttribute(PersistenceMode.Attribute)> 
Public Overridable Property FromURIPattern As String
	Get
	Set
<PersistenceModeAttribute(PersistenceMode.Attribute)> 
Public Overridable Property FromURIPattern As String
	Get
	Set
public:
[PersistenceModeAttribute(PersistenceMode::Attribute)]
virtual property String^ FromURIPattern {
	String^ get ();
	void set (String^ value);
}
public:
[PersistenceModeAttribute(PersistenceMode::Attribute)]
virtual property String^ FromURIPattern {
	String^ get ();
	void set (String^ value);
}
[<PersistenceModeAttribute(PersistenceMode.Attribute)>]
abstract FromURIPattern : string with get, set
[<PersistenceModeAttribute(PersistenceMode.Attribute)>]
override FromURIPattern : string with get, set
[<PersistenceModeAttribute(PersistenceMode.Attribute)>]
abstract FromURIPattern : string with get, set
[<PersistenceModeAttribute(PersistenceMode.Attribute)>]
override FromURIPattern : string with get, set
Property Value
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: 2015.6.15.120