Setting Up the ColdFusion Verity Search Engine
About 4 min read
ColdFusion includes the Verity search engine which allows you to easily provide search capabilities to your Web site. The process of setting up the Verity search engine in a web site consists of:
This lesson will explain those steps. There is a mini-quiz at the end of the lesson. Create Verity collectionIn order to use Verity, you need a location to store the necessary collection of files for the search engine. You create the necessary files in this location with the ColdFusion Server Administrator. You can do this on your PC and your host administrator can do this on the ColdFusion server. The method to do this is:
A folder with that name and associated sub-folders will be created. Creating Verity pagesYou can use the Verity Wizard in ColdFusion Studio to create the pages required to perform your search. It is easy to do this on your PC. You can then test them and upload the files to the CF server, or you can perform the process directly online. Select File > New, click the CFML tab, and choose Verity Wizard. As you go through the Wizard, you can opt to place your four Verity search files in the root directory of your Web site or some sub-folder of your choice. The following four files are created in your web site root directory:
Make adjustmentsIt is not a bad idea to check your files to make adjustments, especially if you plan to upload them to the server. Change to relative locationsWithin each the the Verify files, change the indicated tags to relative locations. search_name_VOpenFile.cfmIt isn’t a bad idea to change <CFSET WorkingDirectory = XXX> to a relative file, instead of naming the drive and such. search_name_VPathIndexing.cfmLikewise, change <CFSET IndexDirectory = XXX> to a relative location. search_name_VSearchForm.cfmLikewise, change <CFSET SearchDirectory = XXX> to a relative location. Also change MyApplication_VOpenFile.cfm to include name of your application (i.e. search_name) search_name_VSearchResult.cfmLikewise, change <CFSET SearchDirectory = XXX> to a relative location. ProblemsI had some problems in search_name_VSearchForm.cfm, with:
which gave error messages. This is because the color codes (i.e. #FFFFF) need an extra # (i.e. ##FFFFF) to work properly when part of a statement enclosed between two #s. You can add the extra #s or simply delete the <TR bgcolor=…> and the problem goes away. In conclusionThe process to set up and use the Verity search engine is relatively straightforward. It seems to do a fairly good job of searching the site and presenting an output.. If you are reliable, you are valuable | Search |
Mini-quiz to check your understanding(Note: Your browser must be able to use JavaScript for this quiz to function properly.) QUIZ Self-check your understanding
Pick an answer to see instant feedback. Re-read the lesson if you miss one. If you got all three correct, you are on your way to becoming a champion in ColdFusion development. If you had problems, you had better look over the material again. |
What do you think?Feel free to establish a link from your web site to pages in this site. |
SearchEnter one or more keywords to search the School for Champions site and find related lessons: |
