![]() |
| ||
| 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 "<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 |
| ||
| 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? |
| ||
| 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 |
| All times are GMT -4. The time now is 9:58 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC