954,598 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Help with search coding

hey everyone. first time poster here. i've been having trouble with my search feature on a website that i designed (well i helped design). it works fine when i'm in the indexing service but on the site it wont. if i search for random letters, it will say "No search results" just like it should. but when i search for something it should be able to find, it just gives me a blank page. i'm pretty sure its a problem in the asp coding but i cant find it anywhere. also, if i search for something relatively unique, the blank page is just a single blank page but if i search for something like 'smith' there is a scroll bar at the side and the page is much bigger. so i think its finding everything, it just wont display it for whatever reason. here is the code:


Dim Index
Set Index = Server.CreateObject("IXSSO.Query")

Index.SetQueryFromURL Request.QueryString

Index.DefineColumn "dc_description (DBTYPE_WSTR) = d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1 dc.description"
Index.DefineColumn "dc_title (DBTYPE_WSTR) = d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1 dc.title"
Index.DefineColumn "dc_subject (DBTYPE_WSTR) = d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1 dc.subject"

Index.Columns = "filename,HitCount,dc_description,dc_title,dc_subject"
Index.SortBy = "dc_title"
Index.MaxRecords = 300

Dim Results
Set Results = Index.CreateRecordset("nonsequential")

Response.Write ""
Response.Write ""
Response.Write "New Tecumseth Digital History - Search Results"
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write "Search Results"
Response.Write ""
Response.Write "


"
Response.Write ""
Response.Write ""
Response.Write ""

If Not Results.Eof Then

Do While Not Results.Eof

Response.Write ""
Response.Write Results("dc_title") & "

"
Response.Write Results("dc_description")
Response.Write "

"

Results.MoveNext

Loop

Else
Response.Write "No results were found."
End If


anyone see anything wrong? i can also post an example of one of the indexed pages if that will help. the address for the site is: www.newtecumseth.library.on.ca/history/

thanks

Deans20
Newbie Poster
3 posts since May 2005
Reputation Points: 10
Solved Threads: 0
 

ok i discovered something... if i change this line:

Response.Write Results("dc_title") & chr(34) & "
"

to this:

Response.Write Results("dc_title") & chr(34) & "hello""
"

the search results appear but rather than the link be the article title, it is 'hello'. i've played around with that line quite a bit and cant figure it out. any suggestions?

Deans20
Newbie Poster
3 posts since May 2005
Reputation Points: 10
Solved Threads: 0
 

nevermind... i figured it out. i needed to add meta properties to the catalog and rescan it or something like that

Deans20
Newbie Poster
3 posts since May 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You