944,137 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 2774
  • ASP RSS
May 10th, 2005
0

Help with search coding

Expand Post »
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 "<html>"
Response.Write "<head>"
Response.Write "<Title>New Tecumseth Digital History - Search Results</Title>"
Response.Write "</head>"
Response.Write "<body bgcolor=" & chr(34) & "#F7EFD6" & chr(34) & "LINK=" & chr(34) & "#993333" & chr(34) & "VLINK=" & chr(34) & "#666633" & chr(34) & ">"
Response.Write "<table border=0 cellpadding=3 cellspacing=5 width=530>"
Response.Write "<tr>"
Response.Write "<td>"
Response.Write "<div align=" & chr(34) & "center" & chr(34) & ">"
Response.Write "<p>"
Response.Write "<font face=" & chr(34) & "arial" & chr(34) & " size=3>"
Response.Write "<b>Search Results</b>"
Response.Write "</font>"
Response.Write "</p>"
Response.Write "</div>"
Response.Write "<p>"
Response.Write "<font face=" & chr(34) & "arial" & chr(34) & " size=2>"

If Not Results.Eof Then

Do While Not Results.Eof

Response.Write "<b><a href=" & chr(34) & "/history/database/"
Response.Write Results("filename")
Response.Write chr(34) & ">"
Response.Write Results("dc_title") & "</a></b><br>"
Response.Write Results("dc_description")
Response.Write "<br><br>"

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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Deans20 is offline Offline
3 posts
since May 2005
May 10th, 2005
0

Re: Help with search coding

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

Response.Write Results("dc_title") & chr(34) & "</a></b><br>"

to this:

Response.Write Results("dc_title") & chr(34) & "hello""</a></b><br>"

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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Deans20 is offline Offline
3 posts
since May 2005
May 11th, 2005
0

Re: Help with search coding

nevermind... i figured it out. i needed to add meta properties to the catalog and rescan it or something like that
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Deans20 is offline Offline
3 posts
since May 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: utf-8
Next Thread in ASP Forum Timeline: Problem with my project





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC