Full Text File Search

A full text search normally involved indexing a group of files and use a SQL query to retrieve the contents. You can implement the entire procedures in MS-SQL. But first, you must have an SQL server license and an SQL server (Resource hawk) before you can deploy that. Displaying the content is bit more tricky. You can display .html files but you cannot display .asp or aspx files as they'll execute in the browser. The bottom line is that it'll take an IT professional to maintain the chore. Further more today's web documentation contents are all lose files similar to the documentation of this product. There are about 200+ files spanning across several directories mixed with a few non-related files. 

The ASPdbSearchFiles feature of Tornado is actually a pretty complete and stand alone feature to enable you to produce a file search facility with just a few lines of code. There are many options like Include and Exclude file patterns for multiple directories, System search box, Base and Pop targets, Display columns and ASCII extensions. For files with extension identified by the ASCII extension, the search text will be highlighted automatically in the display.

The following example is simply amazing. It is a self-contained full text search application. No Index server, No database, no SQL and no maintenance. Just add and subtract files in the directories. If you are supplying your own Searchbox, just define the action as this filename with a target and the defaults will kick in and everything will be automatic.

Complete Stand Alone Full Text Search - Tornado Documentation

<!--T_FullTextSearch.aspx-->

<script language='vb' runat='server'>
Sub Page_Load(Source as Object, E as EventArgs)
   Dim ST As New Tornado.Z()
   With ST
      .dbUnit = 1
      .dbSkin = "bluesky"
      .dbTextHolder = "Title=Search Tornado Manual, Examples and Demo"
      .dbSearchFilesParams = "inc=/tornado/manual04/*.shtm,/tornado/*.aspx| exc=/tornado/manual04/manual*.*; *.doc| Col=3| Search=true| HideBlock=Comments"
      dim sf as string = Request.QueryString("ASPdbSearchFile")
      if sf <>"" then
response.write("<html><Head><link rel='stylesheet' href='/tornado/css/BlueSky/Style.css'></Head><BODY onLoad='self.focus()'><BR>")
         .ASPdbDisplaySource(sf,,,request.querystring("ASPdbSearchText"))
         response.write("</body></html>")
      else
         Response.Write(.ASPdbSearchFiles())
      end if
   End With
End Sub
</script>

After you tried this example, you can image that all you need to do is to setup the directories and you'll have a full text search implementation.

Complete Stand Alone Full Text Search - Classic ASP-db Documentation

<!--T_FullTextSearchClassic.aspx-->

<script language='vb' runat='server'>
Sub Page_Load(Source as Object, E as EventArgs)
   Dim ST As New Tornado.Z()
   With ST
      .dbUnit = 1
      .dbSkin = "bluesky"
      .dbTextHolder = "Title=Search Tornado Manual, Examples and Demo"
      .dbSearchFilesParams = "inc=/aspdb/doc2002/*.shtm, /aspdb/doc2002/ASPCode/*.asp;*.html, /aspdb/doc2002/ASPCode/Basic/*.asp;*.html;*.inc, /aspdb/doc2002/designer/*.htm| Col=3"
  
   dim sf as string = Request.QueryString("ASPdbSearchFile")
      if sf <>"" then
response.write("<html><Head><link rel='stylesheet' href='/tornado/css/BlueSky/Style.css'></Head><BODY onLoad='self.focus()'><BR>")
         .ASPdbDisplaySource(sf,,,request.querystring("ASPdbSearchText"))
         response.write("</body></html>")
      else
         Response.Write(.ASPdbSearchFiles())
      end if
   End With
End Sub
</script>

This example searches the Classic ASP-db documentation and code files including the Designer's files. The only parameters changed are the include directories. Now do you see how easy it is to handle the full text search of your project documentation files.