Search these areas:
Help
Support Forums
Product Info



Introduction
DataWeb: What's New
Creating an Application
The DataWeb Designer
Application Management
Data Tables
Data Tables
Views
Templates
Components
Data Analysis
Members
Security
Importing
Exporting
FTP
JavaScript
Object Model
Full-Text Search
-Tips for Searching
-Using the Search Module
-Define Search Catalogs
-Generate Search Index
-Return Search Results
Domain and Email Hosting
HotBlock Modules
Account Management
Glossary
New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
Script Library
Knowledge Base

Home > Support

DataWeb User's Guide

Generate Search Index
The second step in implementing full-text search in your application is generating the search index.

To generate the search index, use the buildSearchIndex() method of the Web object. This method takes no arguments. The following example shows a function 

webcall function StartBuildIndex()
    {
    try
        {
        Web.buildSearchIndex();
        response.write("Index complete.");
        }
    catch(e)
        {
        <ws:tags>
        The search index could not be built.<br><br>
        Additional information: <%=e.Description%>
        </ws:tags>;
        }
    }


Each catalog that is successfully indexed is recorded in the /system/log table.

If there is invalid XML in the search.xml file, the buildSearchIndex() method throws an exception.

You can use the deleteSearchIndex() method to delete the search index. Note that it's not necessary to delete the search index in order to update it; recreating the search index will overwrite the existing index.

Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us