How does the Express Web site add Chinese full text to the cable function?
How to add the Chinese full text check function to your Web site?
In the Windows NT Option Pack, including the index Server, you can search the Web site for Microsoft Word or Microsoft Excel files, text, HTML, The data in the file format such as ASP.
This unit teaches you how to search for information in a particular catalogue.
To perform an example of a Chinese full-text check, first install the Microsoft Index Server for the Windows NT Option Pack, and then create a catalog named NTOP at Index Server Manager.
method to perform Index server Manager, right-click on [Index Server ' local Machine] and select [New] [Catalog].
And then named Catalog as NTOP, select a sample installation path, set up a search for the record, and, in the newly established ntop Catalog, press the right button, select [New] [Directory], enter the catalogue to be searched, and then activate the index Server, Index Server on the local Machine] press the right button and select [Start].
The user uses the browser to perform the input search string index.
The title found for this example is the <TITLE> you find the Index Server </TITLE>.
How to add Chinese full text check function to ASP program? First set Q = Server.CreateObject ("Ixsso"). Query) to call the components of the Chinese Full-text cable, and then set:
Q.query = search string
Q.sortby = Arrange Order
Q.columns = search for a place
Q.Catalog = search for Catalog
Q.maxrecords = Most search for the pen
After the last line Q.createrecordset ("nonsequential"), the search results are placed in the RS Recordset, as follows:
Rs. RecordCount: Search for matching pens.
RS ("Rank"): Search for a consistent rate, maximum 1000.
RS ("DocTitle"): Title.
RS ("Vpath"): URL address.
RS ("characterization"): summary.
RS ("size"): File size.
RS ("filename"): File name.
RS ("write"): file is written into date.
The complete ASP program is as follows:
<HTML><HEAD>
<TITLE> you have found Index Server </TITLE>
</HEAD>
<BODY>
<%
If Request ("Action") = "search" Then
Set Q = Server.CreateObject ("Ixsso.") Query ")
Q.query = Request ("SearchString")
Q.sortby = "Rank[d]"
Q.columns = "DocTitle, vpath, filename, size, write,
Characterization, Rank "
Q.maxrecords = 50
Q.Catalog = "Ntop"
Set rs = Q.createrecordset ("nonsequential")
Response.Write "Total" & Rs. RecordCount & "<p>"
%>
<% do, not Rs. EOF%>
<%if VarType (RS ("DocTitle")) = 1 or RS ("doctitle") = "" Then%>
<a href= "<%=rs (" Vpath ")%>" ><%= "
Server.HTMLEncode (RS ("filename"))%></a> (<%= rs ("rank")%>)
<%else%>
<a href= "<%=rs (" Vpath ")%>" ><%= Server.HTMLEncode (rs ("DocTitle"))%></a> (<%= rs ("rank")% >)
<%end if%>
<BR>
<%if VarType (RS ("characterization") = 8 and RS ("characterization") <> "" Then%>
Absrtact: <%= Server.HTMLEncode (rs ("characterization"))%><br>
<%end if%>
Http://<%=Request ("SERVER_NAME")%><%=rs ("Vpath")%><br>
<%if not RS ("size") = "" Then%>
Size <%=rs ("size")%> bytes-<%=rs ("write")%> GMT
<%end if%>
<P>
<%
Rs. MoveNext
Loop
End If
%>
<form action= "index1.asp" method=get>
Search string:
<input type= "TEXT" name= "searchstring" size= "value=" <% = Request ("searchstring")%> "></TD>
<input type= "SUBMIT" name= "Action" value= "Search" >
</FORM>
<HR></BODY></HTML>