<html><head>
<title>iskeyword.asp</title>
</head><body bgcolor="#ffffff">
<form action = "iskeywordrespond.asp" method="get">
choose the word you want to search for::<p>
search word: <input name="keyword" size ="30"><br>
<input type="submit" value="find the documents!">
</form>
</body></html>
the iskeywordrespond.asp looks like this:
<html><head>
<title>iskeywordrespond.asp</title>
</head>
<body>
<%
set objquery = server.createobject("ixsso.query")
set objutil = server.createobject("ixsso.util")
my_keyword=request("keyword")
objquery.catalog="learnasp"
keyword search
myquery=myquery & "$contents " & my_keyword
exclude specific folders
%>
<!–#include virtual="/search/exclude.asp"–>
<%
exclude specific filenames
myquery=myquery & " and not #filename indexmaster.asp"
myquery=myquery & " and not #filename index.asp"
myquery=myquery & " and not #filename indexold.asp"
exclude specific extensions
myquery=myquery & " and not #filename *.|(txt|,inc|,htm|,mdb|,cnt|,class|,toc|,html|,css|)"
objquery.query=myquery
objquery.columns = "vpath, doctitle, filename, characterization, contents,dockeywords, rank"
objquery.sortby = "rank [d]"
objquery.maxrecords = 50
objutil.addscopetoquery objquery, "/", "deep"
linebr="<br>" & vbcrlf
set rstemp = objquery.createrecordset("nonsequential")
do until rstemp.eof
for each key in rstemp.fields
keyname=lcase(key.name)
select case keyname
case "vpath"
response.write "<a href="
response.write key
response.write ">" & key & "</a>" & linebr
case else
response.write "<b>" & keyname & ":</b>" & linebr
response.write key & linebr
end select
next
response.write "<br><hr>"
rstemp.movenext
loop
clean up
rstemp.close
set rstemp=nothing
set objquery = nothing
set objutil = nothing
%>
</body>
</html>
it has to exclude many folders on my site and the following file excludes directories:
<%
myquery=myquery & " and not #vpath = *\*_* "
myquery=myquery & " and not #vpath = *\_contents* "
myquery=myquery & " and not #vpath = *\_raw* "
myquery=myquery & " and not #vpath = *\ads* "
myquery=myquery & " and not #vpath = *\aspace* "
myquery=myquery & " and not #vpath = *\advice\draft* "
myquery=myquery & " and not #vpath = *\aspmagazine\new* "
myquery=myquery & " and not #vpath = *\aspfuture* "
myquery=myquery & " and not #vpath = *\asptraining* "
myquery=myquery & " and not #vpath = *\aspynews* "
myquery=myquery & " and not #vpath = *\activeserverpages* "
myquery=myquery & " and not #vpath = *\contribute* "
myquery=myquery & " and not #vpath = *\cst* "
myquery=myquery & " and not #vpath = *\charlescarroll\draft* "
myquery=myquery & " and not #vpath = *\dcline* "
myquery=myquery & " and not #vpath = *\drafts* "
myquery=myquery & " and not #vpath = *\experiments* "
myquery=myquery & " and not #vpath = *\future* "
myquery=myquery & " and not #vpath = *\home* "
myquery=myquery & " and not #vpath = *\how* "
myquery=myquery & " and not #vpath = *\images* "
myquery=myquery & " and not #vpath = *\library* "
myquery=myquery & " and not #vpath = *\learn\cover* "
myquery=myquery & " and not #vpath = *\private* "
myquery=myquery & " and not #vpath = *\perlscript* "
myquery=myquery & " and not #vpath = *\reference* "
myquery=myquery & " and not #vpath = *\redesign* "
myquery=myquery & " and not #vpath = *\search* "
myquery=myquery & " and not #vpath = *\searchasplists* "
myquery=myquery & " and not #vpath = *\secret* "
myquery=myquery & " and not #vpath = *\sites* "
myquery=myquery & " and not #vpath = *\search* "
myquery=myquery & " and not #vpath = *\speedsitelaws* "
myquery=myquery & " and not #vpath = *\start* "
myquery=myquery & " and not #vpath = *\trash* "
myquery=myquery & " and not #vpath = *\test* "
myquery=myquery & " and not #vpath = *\upload* "
myquery=myquery & " and not #vpath = *\upload\tests* "
myquery=myquery & " and not #filename indexmaster.asp"
myquery=myquery & " and not #filename index.asp"
myquery=myquery & " and not #filename indexold.asp"
myquery=myquery & " and not #filename *.|(txt|,inc|,htm|,mdb|,cnt|,class|,toc|,html|,css|)"
%>
