p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 (http://p2p.wrox.com/forumdisplay.php?f=264)
-   -   Announce: Search Module for TBH available (http://p2p.wrox.com/showthread.php?t=61015)

jimibt August 10th, 2007 08:50 AM

Announce: Search Module for TBH available

After a few requests for this, I've created a search module using THB structure and made it available for download. It uses SQLServer 2005 free-text searching, so a little bit of research into that might not go amiss.

Anyway, without further ado:


There is a brief readme file in the archive. Take a bit of time to register the main points and then give it a go. I've tried it on a vanilla copy of TBH and it integrates straight off, so hopefully it should be a breeze to integrate.

Let me know of any issues (regarding the code, as opposed to free-text setup!!) and i'll try and work thro them.

All the best...

[edit] changed location to V1.5



Maxxim August 10th, 2007 09:49 AM

Thanks Jimi!

I am working on articles because i want to improve categories and sub-categories...

In a couple of days i would need to implement some search engine and i'll give to you some feedback about your code!

Best regards!

jimibt August 10th, 2007 10:34 AM


plb August 10th, 2007 11:14 AM


You are indeed a resource for the rest of us. But a few questions...

Your search function works I presume for Articles. Does it also search the Forums simultaneously?

I see that many web sites are using Google Search on their sites. What are the trade-offs between these two approachs? Did you consider Google?



jimibt August 10th, 2007 11:21 AM


I did it against forums and articles (and in the case of my own site, homepages too). I decided on this route so that i could have total control over both content and how i implemented the search. i did look at the google api and tho' quite a bit less work, to me, the reliance on google 'spidering' all my nooks and crannies was just to much of an unknown. i also created my free-text indexes based on body, abstract and title, so all facets are being searched simultaneously.

Also, i want to be able to gather stats on searches (words, distribution, dates number returened etc), so that i can present 'dashboard' info on this kinda thing. Of course, with google, i could probably 'scrape' that stuff out, but that's a bit kludgie and the extra effort for me is worth it. Now i can add onto the base foundation of what i've got and tweak it as i go. Who knows, perhaps a few mebers here will modify the basics and make it even better!! :D



vantoko August 11th, 2007 08:10 AM

Hi Jimi,

I'm glad you worked it out.
Keep in mind what I wrote in my original full text search post on codeplex.
Free text search caches a lot of information so you need to shedule a sql job that queries your DB every x minutes (on my site I do that every 10 mins)
the downside is that not all hosting providers allow you to create jobs



jimibt August 11th, 2007 10:00 AM

koen - i've got a little c# server object that does just that (it queries the default.aspx, the forums and does a random search in quick succession).

useful also as it keeps my 'site' in cache too. Shame these kind of kludges are required mind you, but i suppose it's a relatively small price to pay.



vantoko August 12th, 2007 02:02 AM

Hi jimi,

could you post the source for that object?

In sql 2008 the caching problem is solved. So when book version 3 is released it might be solved :-)


jimibt August 12th, 2007 05:05 AM


it's actually a 'job' that's run on a company site as part of a scheduled task. However, i'll try and put together some source code that could run on any pc and zip it up for you. i do actually have to hand some old vb6 code that would do that 'straight off'. i could dig that out and see if i can translate it quickly into c#.



EswaraPrakash August 13th, 2007 02:25 PM

I downloaded a copy of your search module and tried to incorporate it on my local development site. I just got some error on Helpers.cs file I dont get the codes for "RemoveSpacesFromString:

Could you please help me out by providing code for this.

Thank you,

All times are GMT -4. The time now is 01:54 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.