Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 11th, 2005, 02:55 PM
Deans20 Deans20 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 6 Deans20 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 39 m 52 sec
Reputation Power: 0
problem in search coding...

hey everybody. i've been trying to fix a search engine on a website that i helped develop and i cant figure out the problem. i have everything indexed and the search works fine in the indexing service. the problem seems to be in the asp coding somewhere. when i run a search for something like "kjarfoih" it says 'no search results to display' just like it should. but when i search for something like "smith" it gives me a blank page as if it has found something but can't display it. also, if i search for a more common word, the blank page has a scroll bar on the side as if there should be a lot of results there. i've looked at the search loop in the coding and there are two breaks right near the end of the loop. i figure thats where the blank page is coming from. here is the coding:

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_subje ct"
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") & chr(34) & "</b></a><br>"
Response.Write Results("dc_description")
Response.Write "<br><br>"

Results.MoveNext

Loop

Else

Response.Write "No results were found."

End If

Response.Write "</font>"
Response.Write "</p>"
Response.Write "</td>"
Response.Write "</tr>"
Response.Write "</table>"
Response.Write "</body>"
Response.Write "</html>"
%>

the red area is where i think the problem is. i've managed to get it to display a link if i change this line:

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

to this:

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

but then all of the links say 'blah blah blah'! i've messed around with this line SO much and i cant get it to work properly. anyone have any ideas? the website address is: www.newtecumseth.library.on.ca/history

if you need me to post the coding for one of the indexed pages just let me know and i can do that. if you visit the site, you may get some strange errors because i'm constantly messing around with it.

Reply With Quote
  #2  
Old May 11th, 2005, 03:03 PM
mehere's Avatar
mehere mehere is offline
Senior Sarcasm Wizardess
Click here for more information.
 
Join Date: Feb 2005
Location: Dreamland
Posts: 12,867 mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)  Folding Points: 10976 Folding Title: Novice Folder
Time spent in forums: 4 Months 4 Weeks 15 h 20 m 54 sec
Reputation Power: 1762
I'm confused, your search seems to be working. However, what I'm getting back is where each match has the following:

"Our listing function is experiencing technical difficulties, however, this link will take you to a page related to your query."

With links to a page that did contain the word I searched for. Don't know where you problem is.
__________________
Come JOIN the party!!!

Quote of the Month:
Retirement: Because you've given so much of yourself to the company that you don't have anything left we can use.

Questions to Ponder:
What do you do when you see an endangered animal eating an endangered plant?

iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
copyright© 2008 sbenj69

Reply With Quote
  #3  
Old May 11th, 2005, 03:13 PM
Deans20 Deans20 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 6 Deans20 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 39 m 52 sec
Reputation Power: 0
when the results display, it is supposed to show the title of the page and the description of the page but for whatever reason it wont. all i can manage to make it do is show that message. i should also mention that the whole site was moved from one server to a new one so it all had to be re-indexed. maybe that is causing the problem somehow.....


i just found the same problem on another search engine on that site. the address is: http://www.newtecumesth.library.on.ca/banting/main.html

i havent fixed this one up at all so you can see what i mean by the blank page thing. try searching for something common and then uncommon and you'll see what i mean with the scroll bar thing. its finding stuff, just not displaying the title/description. could it be a problem in the way it was indexed? like maybe the dc_title and dc_description part?

Reply With Quote
  #4  
Old May 11th, 2005, 05:01 PM
Deans20 Deans20 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 6 Deans20 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 39 m 52 sec
Reputation Power: 0
SUCCESS!! i FINALLY figured it out! turns out i just needed to add meta properties to the property cache and do a rescan of the catalog. now i can finally relax.

Reply With Quote
  #5  
Old May 11th, 2005, 05:05 PM
mehere's Avatar
mehere mehere is offline
Senior Sarcasm Wizardess
Click here for more information.
 
Join Date: Feb 2005
Location: Dreamland
Posts: 12,867 mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)mehere User rank is General 12nd Grade (Above 100000 Reputation Level)  Folding Points: 10976 Folding Title: Novice Folder
Time spent in forums: 4 Months 4 Weeks 15 h 20 m 54 sec
Reputation Power: 1762
Glad you got it working ... Since I've never used indexes I was trying to see what the issue could be ...

Thanks for posting the resolution to this.

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > problem in search coding...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT