Using index servers-adding properties

Source: Internet
Author: User
Tags query
Server | Index Add attribute

The Objquery object is now established and is configured before it is established to set up a recordset that references it. Of course, one of the basic things you need to do is
Create a query-that is, what you want to find in the database. This is done in the introduced URL information-one way is to extract everything from the URL and automatically
In the object:

Objquery.setqueryfromurl (Request.QueryString)

This extracts all the different parameters, attributes, and query string information from the URL and places it in the object to which it belongs. In the form
The parameters that are established as suppressed fields are thus converted into properties for searching.

Move in a column

Below, indicate which columns you want to return from the search. We've got the most common information, and the summary and URL information.
Other information is the scope of future discussions.

Objquery.columns= "Filename,hitcount,vpath,doctitle,characterization"

At this time, we are in the request file name, the query string for us to take place in the source file clicks, the document title (HTML in the title tag of the
and the summary information of the file. This gives the user the overall picture of the page.

If you place a description meta tag on the page, that information is included in the description. If not, the description will provide the first display of each page
Part of the look. The index server ignores the inclusion and script text in the file, so you usually get only "real" content.


The final finishing

Now you can query the database-you just need to create a recordset like any ADO data source.

Set rsquery = Objquery.createrecordset ("nonsequential")

Well, now that you've queried your server. Don't panic, don't make a fuss. Now you have a recordset rsquery that you can use on it
MoveNext, MovePrev and other methods. You can refer to the columns returned by the query by using the Rsquery object to pull them up:

Rsquery ("DocTitle")

You even have the standard record count attribute associated with the result. Rsquery.recordcount lets you know the total number of returned rows, which is the number you specify
The maximum value of the property used for the query.

Try it from the tool on the left-you can follow the steps of the Code on the page you just downloaded. Using an index server is really
A good way to query your site.



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.