Site Search

  • Thread starter Thread starter Scott M.
  • Start date Start date
S

Scott M.

Sorry if this isn't the right NG for this....

What is involved in providing a small text box and submit button on my
homepage that will provide site searching capabilities? I know that Index
Server plays the role of cataloging the text, but I mean how do I
programmatically pass the search phrase to Index Server and receive back
results?
 
Hi Scott,


Thanks for posting in the community! My name is Steven, and I'll be
assisting you on this issue.
From your description, you are wanting some information on how to implement
web based(b/s) searching capabilities
using the index server service,yes?
If there is anything I misunderstood, please feel free to let me know.

Based on my research, the question you mentioned is about the "Web-based
Search Solutions" using the Microsoft Index Service which need to use some
Web applicaton development techniques(such as ASP or ASP.NET) together with
the Exchange server's Index Service apis. And I've searched a tech article
which provide detailed description on this topic:
#Extending Web-Based Knowledge Management with MS Exchange Server
http://www.microsoft.com/technet/prodtechnol/exchange/exchange55/downloads/e
xtend.asp?frame=true
It used a classic sample search site that shows you how you can customize
the search capabilities provided by Microsoft Site Server when indexing
Exchange Public Folders. The sample used the ASP(Active Server Page)
technique to build the web application, you may also simply change it using
the ASP.NET. Please have a look to see whether it's helpful to you.

In addition, here are some other web references on the MIcrosoft Index
service,
#Anatomy of a Search Solution
http://msdn.microsoft.com/library/en-us/dnindex/html/msdn_ss-intro.asp?frame
=true

#Introduction to Microsoft Index Server
http://msdn.microsoft.com/library/en-us/dnindex/html/msdn_is-intro.asp?frame
=true

#Introduction to Microsoft Index Server
http://msdn.microsoft.com/library/en-us/dnindex/html/msdn_indexfaq.asp?frame
=true

Hope they're helpful.



Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Hi Steven,

Thanks for your response. The first link to the sample application you gave
is based on having Site Server, which I don't have. Can I get the desired
functionality without Site Server? I have already looked at the other links
you provided and while they give a good overview/understanding of what Index
Server is, they don't provide any code or API's to look at.

Thanks,

Scott
 
Hi Scott,


Thanks for your prompt response. Based on my furthur research, the most
common way of using Index service APIS is using script(such as vbscript or
jscript), which could be used not only in web based application but also in
other applications. Here is some tech references on Programming with Index
Services:
#Using Indexing Service APIs from Scripts
http://msdn.microsoft.com/library/en-us/indexsrv/html/ixufilsc_6tf7.asp?fram
e=true

#Creating a Query in Visual Basic Scripting Edition
http://msdn.microsoft.com/library/en-us/indexsrv/html/ixufilsc_7226.asp?fram
e=true

#Creating a Query in JScript
http://msdn.microsoft.com/library/en-us/indexsrv/html/ixufilsc_7wj8.asp?fram
e=true

Also, there're some web server specified index service programming guide:
#Using Indexing Service with Web Servers
http://msdn.microsoft.com/library/en-us/indexsrv/html/ixuwebs_8fzn.asp?frame
=true

In addition, I've also found some kb articles on how to use the Index
Service's Query API:
#Specifying a Catalog in ASP Code (IXSSO Query)
http://support.microsoft.com/?id=238791

#Using Index Server to Query and Display META TAG Information
http://support.microsoft.com/?id=185985

#HOWTO: Use Index Server to Sort Content That Is Tagged with Date Metatags
by Content Management
http://support.microsoft.com/?id=279714

Please check out the above items. If you have any questions or need any
further help, please feel free to let me know.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Here is working code that queries Index Server from a classic ASP page. It
assumes you've collected the search criteria and stored it as "txtQuery" and
your catalog is called "WebServer".

I suppose that there is not yet a .NET class to represent Index Server, but
the "ixsso" library can be referenced in .NET via a COM InterOp reference:

<%@ Language="VBScript" %>
<% Option Explicit %>
<HTML>
<HEAD>
<TITLE>Query Results</TITLE>
</HEAD>
<BODY STYLE="font-family: Verdana; font-size: 8pt">
<%
Dim objQuery ' As ixsso.Query
Dim rsQuery ' As ADODB.Recordset

Set objQuery = Server.CreateObject("ixsso.Query")
objQuery.Query = Request("txtQuery")
objQuery.Columns="filename,vpath,DocTitle"
objQuery.Catalog = "WebServer"
objQuery.MaxRecords = 50

Set rsQuery = objQuery.CreateRecordset("nonsequential")
%>

<h3 align="center">Search Results</h3>
<% If rsQuery.EOF Then %>
<font color=#FF0000>
No documents were found that matched your query.
</font>
<% Else %>
<table>
<tr>
<th>Page Title</th>
</tr>
<%
Do While Not rsQuery.EOF
If rsQuery("doctitle") <> "" Then
%>
<tr>
<td><font size="2"><a href="http://localhost<% = rsQuery("vpath") %>">
<% = rsQuery("doctitle") %></a>
</font></td>
</tr>
<%
End If
rsQuery.MoveNext
Loop
Response.Write "</table>"
End If
%>
</body>
</html>
 
Hi Scott,


Thank you for the response. I'm glad that my suggestion has helped you. The
former web links I provided you are mainly focus on accessing the Index
service via the script language such as vbscript or jscript and the web
based samples are ASP based. So I've done some further research and found
that in addtion to "using the "ixsso" library via a COM InterOp reference
in .NET", we can also use the "MSIDXS provider" and ADO.NET component to
access the Index Services. Here is two KB articles which provide a good
sample on accessing Index Service in an ASP.NET web application:

#HOW TO: Use an ASP.NET Application to Query an Indexing Service Catalog by
Using Visual C# .NET
http://support.microsoft.com/?id=820983

#HOW TO: Use an ASP.NET Application to Query an Indexing Service Catalog by
Using Visual Basic .NET
http://support.microsoft.com/?id=820105

Please check them out to see whether they're helpful. If you need any
further assistance, please feel free to let me know.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Thanks Steven. I was hoping there would be a way without InterOp. I'll
give that a try!!
 
Hi Scott,


Thanks for the followup. The ASP.NET example I provide in the last reply is
using the ADO.NET and the "MSIDXS" OleDbProvider to access IndexService.
They're all dotnet framework buildin functions. If you need any further
assistance, please feel free to let me know.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top