PDA

View Full Version : How can I search my web pages ?


Yovav
11-04-2002, 05:04 PM
I like 2 create a search for my web-site
so I can find key-words (text) in all pages of my web

how can I do it

(related to IIS index)

any ASP understandable sample ?

beetle
11-04-2002, 06:01 PM
Site search engines are not simple. You can find some ASP ones here (http://www.hotscripts.com/ASP/Scripts_and_Components/Search_Engines/) and here (http://www.hotscripts.com/ASP/Scripts_and_Components/Searching/), and probably a dozen other places.

BTW, this is NOT a javascript question. Please try to post in the appropriate forum (http://www.codingforums.com/forumdisplay.php?s=&forumid=8)

:D

Yovav
11-05-2002, 04:57 PM
4Give me 4 posting here,

but I could not get de answer anywhere else,
I guess this forum includes the best artist...

10X again.

Roy Sinclair
11-05-2002, 06:25 PM
I would like to respectfully disagree with Beetle, searching your web site can be done using ASP. Assuming you're here because you have IIS then you can also install Index Server (if it's not already installed) and use it to index your web pages. ASP can then be used to create Search pages that will fulfill your stated goal.

Here's a starting point for discovery: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnproasp2/html/connectingtoindexserver.asp

beetle
11-05-2002, 06:33 PM
Originally posted by Roy Sinclair
I would like to respectfully disagree with Beetle, searching your web site can be done using ASP.WHA??? :confused:

When did I say anything even remotely close to "You can't use ASP to search" ???

Heck, not only did I not say that, but I didn't even say you couldn't use javascript (which in some cases, you can (http://www.javascriptkit.com/script/cutindex14.shtml)).

I just said, "search engines aren't simple" and pointed him to a couple links with ASP search engine scripts. Then I commented that he should have posted in the ASP forum here at codingforums.com.

I reread my first post 5 times and I can't even figure out how you'd get confused enough to conclude that I said/implied such things...

:confused: :confused: :confused: :confused:

Roy Sinclair
11-05-2002, 06:47 PM
Beetle,

:o You're right. I must need more caffeine, I misread your post and your intent entirely. Sorry about that.

beetle
11-05-2002, 06:50 PM
Don't sweat it, I think I was more confused by your response than you were in making it...

Here you go

http://www.sportmats.com/images/coffee-cup.gif

Now, is that one sugar, or two? :D

Yovav
11-05-2002, 09:21 PM
Peace boys :-)

your two links were hyper fine 2 me,

I did want 2 understand how 2 implement a IIS index search,
which I got great examples in the first reply

and finally Roy Sinclair gave the best link I could imagine
infact, I think I'll post here some more Qs in da future...

great forum...:thumbsup:

Roy Sinclair
11-05-2002, 10:23 PM
I'm using Index Server on two web sites (covering more than a quater million pages) now so I've learned how to make it work. Be sure to get and install the Adobe IFilter if you have PDF files and want them to be indexed too.

Also look at the extended properties that are available for MS Office documents, some of them may prove very useful in searches.

Yovav
11-06-2002, 04:36 AM
I have started the indexing service on my target dir,
strangely it finds only words in .js but not in my other (.asp) files

is there a way to tell it to search all files ?
(I'm trying 2 use that example that comes with IIS)

or do I really must get in to it, and define the search object...

will U be kind enough paste some working stuff ?

Roy Sinclair
11-06-2002, 02:02 PM
Use the IIS MMC control to make sure that the "Index this resource" checkbox is turned on for each directory that needs to be indexed (and turned off for directories that shouldn't be indexed).

I've attached a sample page that takes several inputs from either a POST or GET style form including the ability to specify which catalog to search. This page is a simplified version of my main search results page.

Yovav
11-06-2002, 05:41 PM
I'm just about 2 try it,

I guess the include file is just 2 get vbNames (right ?)

Roy Sinclair
11-06-2002, 09:02 PM
The include file is to ge the ADO names. You can also get the names via the global.asa file so if you use the method you should remove the other include. If you don't use the global.asa method you should definitely alter the include call to point to whereever you've got the adovbs.inc file. If you don't have it anywhere in your web site yet you need to search the "Program Files" directory to find it and copy it over to your web site (again, assuming you don't use the global.asa method).

To use the global.asa method see the code below:


<script language="VBScript" runat="Server">
Option Explicit

Sub Application_OnStart

<!-- METADATA NAME="Microsoft ActiveX Data Objects 2.5 Library"
TYPE="TypeLib" UUID="{00000205-0000-0010-8000-00AA006D2EA4}" -->

End Sub

</script>

Yovav
11-07-2002, 08:29 AM
will U be too kind to send me the form that trigger the source in search.txt
(with needed form's fields)

:rolleyes:

10Xz Anyways!

Roy Sinclair
11-08-2002, 05:24 PM
See attachment