UltimateSearch Tutorial
1. Getting Started
2. Adding controls to your page
3. Indexing your web application
4. Using the Admin page
5. Updating the Config file
6. Displaying search results
7. Renaming the Admin directory
8. Reindexing options
9. Indexing PDF, DOC, and more

1. Getting Started

1. Copy UltimateSearchInclude and UltimateSpellInclude directories from C:\Inetpub\wwwroot\Karamasoft\UltimateSearch\v3.0\Controls to the root of your web application.

2. Give full permission to ASPNET (NT AUTHORITY\NETWORK SERVICE in Windows 2003) on the Index and Log directories under the UltimateSearchInclude directory of your web application so that it can save index and log files properly. Open Windows Explorer, right-click "YourApplication\UltimateSearchInclude\Index" directory, select "Properties" and click the Security tab.

If you don't see the Security tab in Windows XP, open Windows Explorer, and choose Folder Options from the Tools menu. On the View tab, scroll to the bottom of the Advanced Settings, clear the check box next to "Use Simple File Sharing", click OK to apply the change, and you should now have a Security tab when viewing the properties of a file on an NTFS volume.

Select your machine in the "Look in" dropdown box. Click the "Add..." button. Add ASPNET (NT AUTHORITY\NETWORK SERVICE in Windows 2003) by double-clicking on it and click OK. In the "Permissions" section, allow "Full Control" permissions and click OK.

Now follow the same steps on the Log directory.

Back to Top

2. Adding controls to your page
UltimateSearchInput and UltimateSearchOutput icons are automatically added to the Web Forms toolbox during installation. If you don't see those icons see section (a) below. If you don't use Visual Studio see section (b) below.

1. Drag-and-drop UltimateSearchInput control into a web form.
2. Drag-and-drop UltimateSearchOutput control into the same web form.

a) Adding UltimateSearch into Visual Studio Toolbox

1. Select Web Forms tab in Visual Studio Toolbox.
2. From Tools menu, select Add/Remove Toolbox Items.
3. Select .NET Framework Components tab, click Browse, and select C:\Inetpub\wwwroot\Karamasoft\UltimateSearch\v3.0\Controls\bin\UltimateSearch.dll.

b) Adding UltimateSearch into your project without Visual Studio

1. Copy C:\Inetpub\wwwroot\Karamasoft\UltimateSearch\v3.0\Controls\bin\UltimateSearch.dll to the bin folder of your application.
2. Add the following register to the top of your aspx page:
    <%@ Register TagPrefix="cc1" Namespace="Karamasoft.WebControls" Assembly="UltimateSearch" %>
3. Add the UltimateSearch controls into your web form as follows:
    <cc1:UltimateSearchInput id="UltimateSearchInput1" runat="server"></cc1:UltimateSearchInput>
    <cc1:UltimateSearchOutput id="UltimateSearchOutput1" runat="server"></cc1:UltimateSearchOutput>

Back to Top
3. Indexing your web application
After building and running your web application, open http://localhost/YourWebApp/UltimateSearchInclude/Admin/UltimateSearch.admin.aspx in Internet Explorer. You will see several links to manage your application. You can index your application, or display the indexed pages and words using this interface.

Note that you may reindex your application either manually by clicking the related links on this Admin page, or automatically by updating the "frequency" and "dependency" settings in the Config file.

Back to Top
4. Using the Admin page
UltimateSearch.admin.aspx page under the UltimateSearchInclude/Admin directory allows you to manage your indexing as well as displaying indexed pages and words. Here is a list of the buttons on this page:

Index Full: When you click this button, it will index everything in your web application from scratch. Your website will still be able to provide search functionality while indexing continues. It will create new index files, and replace the old ones when indexing finishes.

Index Incremental: When you click this button, it will index only the modified documents. Your website will still be able to provide search functionality while indexing continues. It will append the updated documents to the old index files when indexing finishes. If you use "scanUrlList" in the Config file, you should also use "mapPathList" to specify the physical path for those urls. That will be used to get the last modified date of your files during indexing because the web crawlers cannot retrieve the actual last modified date of dynamic pages properly.

Stop Indexing: When you click this button, it will stop the current indexing operation. It will ignore all the newly generated index files, and will keep using the previous set of successful index files.

Load Copied Index: When you deploy your web application to a production/hosting environment, you may not have the ability to crawl/index your website or you may not have the necessary permissions to save your index files. In that case, you may build your index file on your development/publishing machine, and then copy the Index directory onto your production machine. Then you can click this button on your production machine to load the copied index.

Display Indexed Pages: When you click this button, you will be able to see the indexed pages. You can see success/fail status as well as other useful information about each document. You can also sort the list by each column header.

Display Indexed Words: When you click this button, you will be able to see the indexed words. You can also see how many documents each word occurs in, and sort by each column header.

Back to Top
5. Updating the Config file
UltimateSearch.config file under the UltimateSearchInclude directory of your web application lets you configure all the parameters to customize the indexing process. You can specify which directories to scan and index, what type of documents to index, how to score keywords based on their positions, and much more. You can update the Config file in Visual Studio, Notepad, or any other editor of your choice. It has an XML format just like the Web.config file.

Read the Config document to learn more about these settings.

Back to Top
6. Displaying search results
As a common practice you should have the UltimateSearchInput control on all pages either inside a user control, or inside a header include file so that the user can make a search from all pages in your website. However, you would normally have only one page to display the search results, and you should have an UltimateSearchOutput control on that page only. To display the search results on this particular page regardless of where the search is submitted from, you should set the SearchOutputPage property of the UltimateSearchInput control to the url of the search results page that has the UltimateSearchOutput control on it.

Back to Top
7. Renaming the Admin directory
If you have a public website it would be a good idea to rename YourApplication\UltimateSearchInclude\Admin directory such as YourHiddenAdmin so that only the administrative personnel can open this page.

Back to Top
8. Reindexing options
You can reindex your web application in one of the following ways:

Manual: Click the "Index Full" or "Index Incremental" buttons on the Admin page.

Automatic: Set the "frequency" or "dependency" parameters in the Config file.

Programmatic (Internal): Call the "IndexFull" or "IndexIncremental" methods of UltimateSearchOutput.

Programmatic (External): If the "frequency" and "dependency" settings in the Config file don't satisfy your needs, you can always write your own custom program. It is either run by a scheduled task every so often, or it has its own dependencies on several other files, directories or objects. When it runs, it should modify one of the "dependency" files set up in the Config file, which will initiate the indexing process as in the "Automatic" section above.

Back to Top
9. Indexing PDF, DOC, and more
Please refer to the IFilter section of the Config file to learn how you can index different document formats.

Back to Top