Guess I'm using "not a common" way for creating my web-site.
I create a templete which is in .asp format, and all the content is in .inc format (except some in .asp). I have a lot of include files, the whole site share the same "Meta Decsription" and "Title"
I use FSO to maniplulate the content.
When the user activate the link for the navigator, the name of the file will be passed to the function:
For instance:
Function getContent(fileInclude)
Dim objFSO
Dim objText
Dim strPage
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objText = objFSO.OpenTextFile(Server.MapPath(fileInclude))
getContent = objText.ReadAll
objText.Close
Set objText = Nothing
Set objFSO = Nothing
End Function
nameFile = Request.QueryString("nf") "http://www.sitename.com/default.asp?action=feature&cid=0
If nameFile <> "" and codeID = "0" Then 'the code ID is to indicate the condition of the file
fileName = nameFile & ".inc"
strPage = getContent(fileName)
ElseIf nameFile <> "" and codeID = "1" Then
.................................
ElseIf.....
End If
1.)I really don't know what approach should i take for creating my search engine.
After a long searching, I'm thinking of creating a database with 3 fields -> Doc_ title, Doc_ decription, and Doc_URL and use SQL statement as below:
select Doc_decription
from yourtable
where memofield like '*Word1*'
or memofield like '*Word2*'
to search for the match.
I don't know whether they are applicable or not.
2.) I'm wondering how do most of the web-sites implement their search engine, for example: asp101.com.
Their content is in database -driven format as well as static content which is wtitten in .asp and html format.
3.) I don't know whether what i'm thinking is the correct way, is the asp101.com search engine is implemented in such as way where by it searchs the page through the database which has fields such as
Doc Title
Doc Decription
Doc URL
Doc Id
Please advice!!! I 'm lost......