Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» Sitemap
Free Newsletters:
DatabaseDaily  
News Via RSS Feed


follow us on Twitter
Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

MS SQL

Posted Nov 14, 2001

Using index server with ADO calls - Page 2

By DatabaseJournal.com Staff

Creating the Form

The form is quite simple. It's your basic HTML form, with some added, hidden fields that help drive certain search engine characteristics.

You can download the form by clicking here and then follow along. It's a text file from this link, but you can cut and paste it as needed for your use.

If you compare the form setup with the search you see on the left-side of this page, you'll see where the fields come in, and where the Find It! button is displayed. Also, looking that the source in the file, you'll see that the fields are briefly explained:

  • mh is the Maximum number of hits you want to return.  For swynk.com, this value is 200.  Making the value too high can tax your server unnecessarily.  Too low and you won't return enough results to be meaningful.   This will take some tweaking on your part to determine the best value for your site.   (for you SQL folks out there, sounds like "Set rowcount=", doesn't it?)
  • sd is the column name that you want to use as the sort value.  In this case, we're calling out the hitcount column - indicating that we'll display the page with the most hits on the search first then order the results set from there, Descending (the "D" in the SD).   (SQL folks - this is equivalent to the "Order By...")
  • ae simply turns on enumeration for the results set.
  • ct points out where to find the catalog, or index database, that will be used.  This one's a bit tricky.  When you turn on the index server for a given web, you'll indicate where the index database should reside.  You MUST point this value to that location, or the index server will simply return NO results.  (this is the FROM database...)

Then, of course, it calls the ASP page that will take these values and query the server.  Note that it's using a GET type of form processing - more on this in just a minute, but it's imperitive that you use this if you're using our example pages. 



MS SQL Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 




Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
SQL 2005: SSIS: Error using SQL Server credentials poverty 3 August 17th, 07:43 AM
Need help changing table contents nkawtg 1 August 17th, 03:02 AM
SQL Server Memory confifuration bhosalenarayan 2 August 14th, 05:33 AM
SQL Server Primary Key and a Unique Key katty.jonh 2 July 25th, 10:36 AM