I need to Search a Virtual Directory

V

Vicki

I have built a website in frontpage that is located on my
employer's webserver. I have created a search page and
used the built-in search form.
There is a link to a directory on my departments share
drive (this drive is not accessible to the rest of the
corp.) which allows users to view files located in that
directory by clicking a hyperlink that sends them to the
document. I want the search to find these files if they
contain the search term in the name, or in the content.

I have a couple of problems.

1) When I perform a search the results only create a link
to the page the word(s) is on, then you have to search the
page to find the word(s). Is it possible to show some
content in the search results? Is it possible to
highlight the word(s) on the page to make them easier to
find?

2)The search is not locating any files that are located in
the web, or any that are located on the virtual directory.

How can I make the search engine find the files in the web?
More importantly, How can I make it finds the files in the
virtual directory.

I am a novice when it comes to FP and html, so please
explain answers like I'm a dummy. :~)

All help is greatly appreciated.

Thanks,

Vicki
 
J

Jim Buyens

To do either of the things you asked, your Web server
would have to be running Microsoft Indexing Service, and
you'd have to do some relatively difficult programming in
ASP or ASP.NET.

Acutally, it's not that difficult, but it *is* programming
and it's a bit obscure. Not many people do it.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
V

Vicki

Jim,

Thank you for your reply. I researched ASP & ASP.NET. I
use VB w/Excel & Access, and I'm sure I could figure this
out if I could please get some hints.

If you could give me a few things to start with, like how
to make the search form button point to the .asp file, and
some hints for how to point to the virtual directory and
the website to perform the search.

I'm sure this is asking for a lot, but I could really use
some help, and I really want to learn.

Thank you,

Vicki
 
J

Jim Buyens

Vicki said:
Jim,

Thank you for your reply. I researched ASP & ASP.NET. I
use VB w/Excel & Access, and I'm sure I could figure this
out if I could please get some hints.

If you could give me a few things to start with, like how
to make the search form button point to the .asp file, and
some hints for how to point to the virtual directory and
the website to perform the search.

I'm sure this is asking for a lot, but I could really use
some help, and I really want to learn.

OK, you asked for it. Start browsing at:

http://msdn.microsoft.com/library/en-us/indexsrv/html/ixqlang_4dut.asp

and read all the subtopics. For more links, search MSDN for msidxs.
Here's a coding example that works in an ASP page. You'll need to
replace MyCatalog with the name of the Indexing Service catalog that
cross-refrences your virtual Web server. qscope contains the name of
the folder tree to search, and qtext contains the text you want to
find.

cnStIx = "provider=msidxs;data source=MyCatalog"
Set cnIx = Server.CreateObject("ADODB.Connection")
cnIx.Open cnStIx, "", ""

Set rsIx = Server.CreateObject("ADODB.Recordset")
sql = "SELECT Rank, Filename, DocTitle, Path, Vpath, Size, Write " & _
"FROM SCOPE('" & Chr(34) & qscope & Chr(34) & "') " & _
"WHERE (CONTAINS(Contents, '" & _
Chr(34) & qtext & Chr(34) & _
"') > 0) " & _
" AND (Vpath NOT LIKE '%[_]vti[_]%') " & _
"ORDER BY Rank DESC"
rsIx.Open sql, cnIx, adOpenForwardOnly

If rsIx.EOF Then
Response.Write "<p class=err>No matching documents found.</p>" &
vbCrLf
Else
' Code to display contents of recordset rsIx goes here.
End If
rsIx.Close
cnIx.Close
cnIx

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top