Using index servers-objects that use the Index Server

Source: Internet
Author: User
Tags html form query domain
Objects using the Index Server

You can use the Index server just as you would with other databases, which are index servers, which are the content indexing engines included in IIS4. You can make ADO calls to it and search your site, it provides you with a good web search engine.

It's very easy to use. You just have to declare the object, then call the engine, and then reference the attributes, columns, and values you requested.

So, how do you do all these things?

Set up a form page that prompts the user for input, and this page is passed to the Index server engine. Set up the Query engine page and display the results test.

Here's a look at the code that Swynk.com uses in the left column search tool.

Create a form

This form is very simple. This is your basic HTML form, adding some hidden domains that will help drive certain search engine features.


<form method= "Get" action= "/sitesearch/sitesearch.asp" Id=form1 name=form1>
<!--search text-->
<table width= "100%" >
<tr width= "100%" bgcolor= "Black" >
&LT;TD width= "100%" >
<font color= "White" >
<b>Search</b>
</font>
</td>
</tr>
</table>
<input type= "text" name= "qu" size= "><br>"

<!--Max hits-->
<input type= "hidden" name= "MH" value=50>
<!--sort by hits-->
<input type= "hidden" name= "SD" value= "Hitcount" >
<!--Allow enumeration-->
<input type= "hidden" name= "AE" value= "1" >
<!--catalog-->
<input type= "hidden" name= "ct" value= "c:\inetpub\www07120\index\" >
<input type= "Submit" value= "Find it!" name= "Search" > <a href= "/sitesearch/searchhelp.asp" ><font
1>help</a></font>
</form>


If you compare the settings to the search you see on the left side of the page, you can see where the domain was introduced and where the "found" button is.
Show. The following is a brief explanation of the domain:

MH is the maximum number of clicks you want to return. For example, you might want to set this value to 200. Setting this value too high can cause the server unnecessary
The burden. If this value is too down, you cannot return enough meaningful results. It takes some brains to determine the best value of your site (This situation sounds
It's kind of like "Set rowcount=" in sql, isn't it?

SD is the name of the column you want to be used as a category value. In this case, we're calling the Click Value Bar--first we show the most clicked Page in the search, and then
Arrange the result setting in descending order (d for descending)--just like "order by ..." In SQL, is to open the enumeration of the result settings.

CT points to where to find the directory or index database that will be used. Here's a little trick. When you open an index server for a given site, you need to
Indicates where the index database is located. You must point the value to this location, or the index server will return a result no. (This is the from data
Library

Then, of course, call the ASP page that will take these values and query the server. Note that this is using the Get type in form processing-this will be introduced later, but you have to use it as long as you are using our sample page.
Author/source: Green Apple Studio


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.