• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Indexing Data in a Database

One other important use of Verity is for indexing data in databases. You may wonder why you need to do this because you can always search a database using an SQL SELECT statement. The reason is that searching long text database fields with SQL queries can be extremely processor intensive, especially if the SQL LIKE operator is used. In these instances, you'll get better performance if you index the data from the long text fields and search them using Verity. For example, suppose you have a database of journal articles that you want to make searchable. You could try performing a keyword search as follows:

<cfquery datasource="articles" name="qSearchArticles"> 
SELECT articleID, articleTitle, articleSummary
FROM articles
WHERE articleBody LIKE '%Form.keyword#%'
</cfquery>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint