Chapter 20: Understanding the Verity Search Engine


Instructions for Project Execution

This section describes the detailed instructions to execute the application code provided with this book.

Steps to Create the Database

Perform the following steps to create the database and tables:

  1. Choose Start, Programs, Microsoft SQL Server, Query Analyzer. The Connect to SQL Server dialog box appears.

  2. Provide the name of the SQL server. Then provide the user authentication information and click OK.

  3. Ensure that you are connected to the Master database. If you are not connected to the Master database, select it from the Database drop-down list.

  4. Chose File, Open.

  5. In the Open Query File dialog box, select Project5.sql. This script creates the InfoTools database and then creates two tables: SalesInteractions and salesCollections. If the SQL server is installed in C:\, you do not need to modify the script. If the SQL server is installed in any other path, modify the database path in the script.

  6. Click the Execute button on the toolbar to execute the Project5.sql script. This creates the database and the tables in the database.

Perform the following steps to import the data from an Excel file to the tables:

  1. Start SQL Server Enterprise Manager.

  2. Right-click the InfoTools database in the Enterprise Manager.

  3. Select All Tasks, Import Data from the pop-up menu. This starts the Data Transformation Services Import/Export Wizard. Click the Next button to proceed to the next screen.

  4. The Choose a Data Source screen appears. Select Microsoft Excel 97–2000 from the Data Source drop-down list and choose the Excel file Project5Data.xls. Then click the Next button.

  5. The Choose the Destination screen appears. Click the Next button to continue.

  6. The Specify Table Copy or Query screen appears. This copies the tables in the Excel file to the InfoTools database. Click the Next button to continue.

  7. The Select Source Tables and Views screen appears. Select the tables that you want to import.

  8. The Save, Schedule, and Replicate Package screen appears. Select the Run Immediately option and then click the Next button to continue.

  9. Click the Finish button to close the wizard.

Steps to Test the Application in ColdFusion MX

Create the data source as follows:

  1. Start ColdFusion MX Administrator. This is usually located at http://localhost/CFIDE/Administrator/index.cfm, but the location can be different as per the setup.

  2. Provide the password. The main screen appears.

  3. Navigate to data sources under the Data and Services section.

  4. Create a data source named InfoTools for SQL Server.

Test the application as follows:

  1. Create a directory named ProjectFive under the wwwroot directory on the Web server.

  2. Copy all the .cfm files in the ProjectFive directory.

  3. Start the browser and open the ManagingCollections.cfm page (http://hostname/projectfive/ManagingCollections.cfm).

The application also assumes the Web server to be installed in C:\.

Log on to the application as an admin using the http://hostname/projectfive/ManagingCollections.cfm and create the collections. On this page, use the Create New Database Collection link to create a database collection. In the next page, specify the name of the collection (such as MOM if you want to create a collection based on the MinutesofMeeting field). Let the path to the collection be C:\CFusionMX\verity\collections. (Verify that this directory exists on the server.) In this example, select MinutesOfMeeting for Select Fields for Collection. You can also select multiple fields. Select ClientName as the field name, which will be displayed in the search results when a search is performed on this collection.

The document collections are based on documents such as PowerPoint presentations, Word documents, HTML, and so on. For the current example, create a directory C:\inetpub\wwwroot\ProjectFive\Presentations and save files Presentation for Laptops.ppt and Presentation for Printers.ppt in this directory. These files are available to you along with other setup files.

On the start page for admin, use the Create New Document Collection link to create a document collection. You will see the Creating Document-Based Collections page. In this page, enter the data as listed in Table 20.1.

Table 20.1: Sample Data

Label

Value

Collection Name

Presentations

Path to the Collection

C:\CFusionMX\verity\collections

Path to the Files

C:\inetpub\wwwroot\ProjectFive\Presentations

Http path for Search Result Links

http://hostname/projectfive/presentations

File Extensions to be used

Ppt

Include Subdirectories

Yes

This will create a document collection called Presentations. At that point, you can log on to the application as the user by using the http://localhost/projectfive/SearchInterface.cfm page and perform search operations against the created collections. Select the collection name and perform the searches based on the data available in the database table, SalesInteractions, for database collections. With document-based collections, the search is performed on the content of the PowerPoint documents. Search for words like "Printers" and do a document-based search on the Presentations collection.

Almost all Web sites provide search tools to end users. Because there's such a huge amount of content available on the Web, search engines are among the most popular tools. ColdFusion offers the Verity search indexing engine to handle index and search functions. This engine is among the various ColdFusion applications offered by Verity, Inc.

In this chapter, you'll learn how to create collections and perform searches on them using the Verity search engine.




Macromedia ColdFusion MX. Professional Projects
ColdFusion MX Professional Projects
ISBN: 1592000126
EAN: 2147483647
Year: 2002
Pages: 200

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net