General Installation

To use SearchUnit, you must add the following files (where N is your .NET version number) to your project;

and reference KeyotiN.SearchEngine.Web.dll in your web pages that use the Web Controls (not required if using Javascript controls). The assemblies should be listed under "Extensions" in the Visual Studio add reference dialog, or can be browsed to under the install directory, eg C:\Program Files (x86)\Keyoti Inc\SearchUnit 2012\NETCLR_v4_BIN (use NETCLR_v2_BIN for .NET2).

The index directory will need to grant permission to the ASP.NET/IIS user that accesses it, see "Setup" in the index directory topic.

Installation, For Javascript Usage

Client side files

Copy Keyoti_SearchEngine_Web_Common folder from the SearchUnit install folder to your project.

The Javascript usage mode uses AJAX to communicate with the server over either WCF (for .NET 4 up) or ASP.NET Web Services (for .NET 2 up). When possible use WCF, as ASP.NET Web Services are now considered legacy by Microsoft.

Web API (default, .NET 5+)

By default Web API is used, via a Controller present in the Keyoti5.SearchEngine.Web.dll. To enable it, add the bold line in Startup.

	public void ConfigureServices(IServiceCollection services)
    {
            services.AddControllers();
            services.AddRazorPages();
            services.AddControllers().AddApplicationPart(System.Reflection.Assembly.Load(new System.Reflection.AssemblyName("Keyoti5.SearchEngine.Web")));
    }
	

WCF (default, .NET 4.x)

By default WCF is used, via the SearchService.svc file in the Keyoti_SearchEngine_Web_Common folder. No extra configuration should be necessary.

Troubleshooting:

Web Services (.NET 2+)

In the search page that uses the Javascript files, call (after the SearchUnit.js import) keyotiSearch.useWCFService = false;

Installation, for ASP.NET Web Control Based Usage & Javascript Usage

In order to use the AutoComplete feature and ResultPreview feature it may be necessary to perform extra setup in the project that is using the controls.

.NET 4

IIS 6

Add inside the system.web section.
<httpHandlers>
       <add verb="*" path="Keyoti.SearchEngine.Web.CallBackHandler.ashx" 
		 type="Keyoti.SearchEngine.Web.CallBackHandler,Keyoti4.SearchEngine.Web, 
			Version=2015.?.?.?, Culture=neutral, PublicKeyToken=58d9fd2e9ec4dc0e"/>
</httpHandlers>
where 2015.?.?.? should be replaced with the version number of the Keyoti4.SearchEngine.Web DLL.

IIS 7+

Add inside the system.webServer section.
<staticContent>
	<mimeMap mimeType="text/html" fileExtension=".ashx"/>
</staticContent>
<handlers>
	<add name="Keyoti_SearchEngine_Web_CallBackHandler_ashx" verb="*" preCondition="integratedMode" 
	path="Keyoti.SearchEngine.Web.CallBackHandler.ashx" 
	type="Keyoti.SearchEngine.Web.CallBackHandler, Keyoti4.SearchEngine.Web,
	Version=2015.?.?.?, Culture=neutral, PublicKeyToken=58d9fd2e9ec4dc0e"/>
</handlers>
where 2015.?.?.? should be replaced with the version number of the Keyoti4.SearchEngine.Web DLL.

.NET 2, 3, 3.5

To enable the previewer, set the ResultPreviewerEnabled property of the SearchResult control to True.

Usually performed automatically: If the controls are opened in the VS designer, then the web.config will be amended with the required code. If this doesn't occur, then the web.config must be opened and the following changes made:

IIS 6

Add inside the system.web section.
<httpHandlers>
       <add verb="*" path="Keyoti.SearchEngine.Web.CallBackHandler.ashx" 
		 type="Keyoti.SearchEngine.Web.CallBackHandler,Keyoti2.SearchEngine.Web, 
			Version=2015.?.?.?, Culture=neutral, PublicKeyToken=58d9fd2e9ec4dc0e"/>
</httpHandlers>
where 2015.?.?.? should be replaced with the version number of the Keyoti2.SearchEngine.Web DLL.

IIS 7+

Add inside the system.webServer section.
<staticContent>
	<mimeMap mimeType="text/html" fileExtension=".ashx"/>
</staticContent>
<handlers>
	<add name="Keyoti_SearchEngine_Web_CallBackHandler_ashx" verb="*" preCondition="integratedMode" 
	path="Keyoti.SearchEngine.Web.CallBackHandler.ashx" 
	type="Keyoti.SearchEngine.Web.CallBackHandler, Keyoti2.SearchEngine.Web,
	Version=2015.?.?.?, Culture=neutral, PublicKeyToken=58d9fd2e9ec4dc0e"/>
</handlers>
where 2015.?.?.? should be replaced with the version number of the Keyoti2.SearchEngine.Web DLL.

.NET 1.1

web.config

The web.config must be opened and the following added inside the system.web section.
    <httpHandlers>
       <add verb="*" path="Keyoti.SearchEngine.Web.CallBackHandler.ashx" 
		type="Keyoti.SearchEngine.Web.CallBackHandler,Keyoti.SearchEngine.Web, 
			Version=2015.?.?.?, Culture=neutral, PublicKeyToken=58d9fd2e9ec4dc0e"/>
    </httpHandlers>
where 2015.?.?.? should be replaced with the version number of the Keyoti.SearchEngine.Web DLL.

For IIS (without using Visual Studio)

  1. Copy all Keyoti Search DLLs into the bin directory off your application root.
  2. Add

    <%@ Register TagPrefix="searchengine" Namespace="Keyoti.SearchEngine.Web" Assembly="Keyoti.SearchEngine.Web" %>
    
    to the top of the aspx page where you will use the SearchUnit Control (not required if using Javascript based usage).

Client side files

The installer automatically registers a virtual directory called Keyoti_SearchEngine_Web_Common which holds the necessary scripts. This is used by the AJAX features and needs to be present on the development and deployment machines.

Server farms

To do this, specify the IP (or server name) of every server in the farm in the web.config, using an appSetting named Keyoti-SearchEngine-ServerFarmSynchronizationIPs, its value should be a comma-delimited list. It is also necessary to specify an appSetting named Keyoti-SearchEngine-ServerFarmSynchronizationAppPath with a value indicating the relative URL of the app. Eg.

<appSettings>
	<add key="Keyoti-SearchEngine-ServerFarmSynchronizationIPs" value="10.0.0.1,10.0.0.2,10.0.0.3"/>
	<add key="Keyoti-SearchEngine-ServerFarmSynchronizationAppPath" value="/myapp/"/>
</appSettings>

Doing so will allow each server to communicate with each other every 5 minutes with changes in search keyword data.