|
 |
asp_databases thread: Site Search using ASP
Message #1 by "Laphan" <laphan@u...> on Wed, 28 Mar 2001 18:23:00 +0100
|
|
Hi all
Can anybody give me an idea as to what is the best way to create a site
search using ASP. I know I could use Atomz's free service, but it looks
pants and doesn't integrate with the rest of my site.
I was thinking of putting each page's content into an Access DB and then
querying it for the search. This seems OK in theory, but would it be a pain
maintaining the actual pages themselves if using this method?
Has anybody done this sort of thing?
Many thanks.
Regards
Laphan
Message #2 by Kent Tegels <kent@t...> on Wed, 28 Mar 2001 12:55:39 -0600 (CST)
|
|
Just use the Indexing Service instead. Theres a good chapter in
"Professional ASP Data Access" about it :)
On Wed, 28 Mar 2001, Laphan wrote:
> Hi all
>
> Can anybody give me an idea as to what is the best way to create a site
> search using ASP. I know I could use Atomz's free service, but it looks
> pants and doesn't integrate with the rest of my site.
>
> I was thinking of putting each page's content into an Access DB and then
> querying it for the search. This seems OK in theory, but would it be a pain
> maintaining the actual pages themselves if using this method?
>
> Has anybody done this sort of thing?
>
> Many thanks.
>
> Regards
>
>
> Laphan
>
>
>
>
>
Message #3 by "James Cox" <james.cox3@n...> on Wed, 28 Mar 2001 19:29:14 +0100
|
|
How detailed do you want your search to be?
Could you have a keyword search (ie, have a table where you have keywords for each page, and then
search over that) ?
HTH,
James
----- Original Message -----
From: "Laphan" <laphan@u...>
To: "ASP Databases" <asp_databases@p...>
Sent: Wednesday, March 28, 2001 6:23 PM
Subject: [asp_databases] Site Search using ASP
> Hi all
>
> Can anybody give me an idea as to what is the best way to create a site
> search using ASP. I know I could use Atomz's free service, but it looks
> pants and doesn't integrate with the rest of my site.
>
> I was thinking of putting each page's content into an Access DB and then
> querying it for the search. This seems OK in theory, but would it be a pain
> maintaining the actual pages themselves if using this method?
>
> Has anybody done this sort of thing?
>
> Many thanks.
>
> Regards
>
>
> Laphan
>
>
>
>
>
Message #4 by "Markus Hain" <kill@g...> on Thu, 29 Mar 2001 11:11:58
|
|
> Hi all
>
> Can anybody give me an idea as to what is the best way to create a site
> search using ASP. I know I could use Atomz's free service, but it looks
> pants and doesn't integrate with the rest of my site.
>
> I was thinking of putting each page's content into an Access DB and then
> querying it for the search. This seems OK in theory, but would it be a
pain
> maintaining the actual pages themselves if using this method?
>
> Has anybody done this sort of thing?
>
> Many thanks.
>
> Regards
>
>
> Laphan
>
>
>
>
Hi
There are many ways to search, first do you want to search through text or
data in a table ? For text one can use the FSO or put keywords of the
documents in a table. For data searches in tables i would use either an
array or use a dynamic sql statement depending on the amount of fields to
be searched.
Cheers
Markus
Message #5 by "Vince Kavanagh" <vince@6...> on Thu, 29 Mar 2001 19:21:39 +0100
|
|
When I wrote an art gallery site I entered keywords into three separate
columns in the database against each image, the search box was created on a
side frame:
<form method="post" action="quicklist.asp" target="main" id="Qform"
name="Qform" onsubmit="return test1()">
<input name="item" maxlength=15 size=15>
<input align="absMiddle" type="image" name="Search" src="images/formbut.gif"
border="0" alt="Search" WIDTH="20" HEIGHT="20">
</form>
The test1 function just checked for empty returns:
<script Language=javascript>
<!--
function test1(){
if (document.Qform.item.value=="")
{
alert("Please enter a keyword")
return false
}
}
//-->
</script>
The quicklist.asp queried the database and returned any images corresponding
to the search string:
Search = Trim(Request.QueryString("Search"))
MySQL = "SELECT Fname,Lname,Title,Code,TimgSrc,Retail,ImageSize "
MySQL = MySQL & "FROM Detail "
MySQL = MySQL & "WHERE (((Detail.Detail1) LIKE '%" & Search & "%')) OR
(((Detail.Detail2) LIKE '%" & Search & "%')) OR (((Detail.Detail3) LIKE '%"
& Search & "%'));"
'' Write results to browser
Response.Write("Your Search for ")
Response.Write(Search)
Response.Write(" found the following images. ")
All this is nearly three years old now, so there are probably more methods
available, but it worked well for my site.
Best Regards,
Vince.
-----Original Message-----
From: Laphan [mailto:laphan@u...]
Sent: 28 March 2001 18:23
To: ASP Databases
Subject: [asp_databases] Site Search using ASP
Hi all
Can anybody give me an idea as to what is the best way to create a site
search using ASP. I know I could use Atomz's free service, but it looks
pants and doesn't integrate with the rest of my site.
I was thinking of putting each page's content into an Access DB and then
querying it for the search. This seems OK in theory, but would it be a pain
maintaining the actual pages themselves if using this method?
Has anybody done this sort of thing?
Many thanks.
Regards
Laphan
Message #6 by "Vince Kavanagh" <vince@6...> on Thu, 29 Mar 2001 20:03:52 +0100
|
|
Sorry,
Search = Trim(Request.QueryString("Search"))
should have been:
Search = Trim(Request.Form("item"))
the page uses paging and submits to itself, hence the querystring.
Best Regards,
Vince.
|
|
 |