|
|
Fully Customisable CGI/Perl Search Engine?
|
|
|
|
Grizzled Veteran
Join Date: Oct 2002
Status:
Offline
|
|
I want to put a search engine on my website as it needs one badly. I have a heavily modified Perl guestbook, that lives in my cgi-bin folder at present and it works good for me, so I kind of know what I'm doing.
There is only one folder I want to search the contents of. I also want to be able to have full control over what the results pages look like, and also to be able to have it ignore the "CBL - " text that is at the beginning of every pages title. I do not want it to create an index file, nor do I want it to require lots of files to be uploaded; one CGI script would be perfect.
I have tried using Google, various CGI script pages, but everything I've come across is either too simple or too complex.
Does anyone know of a script that would do what I want it to do? If you do, please tell me.
|
BayBook (13" MacBook Pro, 2.4GHz Core 2 Duo, 4GB RAM, 1TB HD) // BayPhone (iPhone 4, 32GB, black)
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Nov 1999
Location: Tampa, Florida
Status:
Offline
|
|
It would be pretty easy, from a perl standpoint. You could read the directory and only put the files you want into the array. From there, you could have the script read each file in the array and search its text for the term. It wouldn't be the most efficient, but since you're limited to text files and not a database, it would work fine.
-Finrock
|
Two atoms were talking one day. One atom said to the other "you know, I think I've lost some electrons." The other atom said "are you sure?" The atom said "yeah, I'm positive." www.thisoldpodcast.com
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Oct 2002
Status:
Offline
|
|
Originally Posted by Finrock
It would be pretty easy, from a perl standpoint. You could read the directory and only put the files you want into the array. From there, you could have the script read each file in the array and search its text for the term. It wouldn't be the most efficient, but since you're limited to text files and not a database, it would work fine.
Hot diggety! So, now I know that it can be done, does anyone know of someone who has made such a thing? Because I haven't the faintest clue even as where to begin, not knowing anything more complex than XHTML and CSS. Or would someone be willing to write it, that many people might use it?
|
BayBook (13" MacBook Pro, 2.4GHz Core 2 Duo, 4GB RAM, 1TB HD) // BayPhone (iPhone 4, 32GB, black)
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Nov 1999
Location: Tampa, Florida
Status:
Offline
|
|
I suppose I could be coerced into writing something like that. I've been meaning to get around to writing one for my site, but I've been distracted lately. If you'd like to discuss feel free to e-mail me at finney at mac dot com.
-Finrock
|
Two atoms were talking one day. One atom said to the other "you know, I think I've lost some electrons." The other atom said "are you sure?" The atom said "yeah, I'm positive." www.thisoldpodcast.com
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Nov 1999
Location: Tampa, Florida
Status:
Offline
|
|
I should have a preliminary version this weekend. E-mail me if you are still interested. I'll make it available for all to download for free.
-Finrock
|
Two atoms were talking one day. One atom said to the other "you know, I think I've lost some electrons." The other atom said "are you sure?" The atom said "yeah, I'm positive." www.thisoldpodcast.com
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Oct 2002
Status:
Offline
|
|
Originally Posted by megasad
I have tried using Google, various CGI script pages, but everything I've come across is either too simple or too complex.
Right, so I finally got off my arse, bothered to fiddle about with the Perl script in the link, and I've got it working on my website to within an inch of how I want it to work.
See for yourselves
The only thing I have left to work out is how to have the results sorted alphabetically, rather than by "ranking". This script seems to be quite complex in how it determines a page's worth, but I do not need any of that, and I cannot work out how to make it simply list the results A to Z.
Does anyone know if this is impossible to do in Perl, and that's why no search engine I've been able to find will do it? Or can it be done?
(
Last edited by megasad; Jun 27, 2005 at 07:41 PM.
Reason: URL Update)
|
BayBook (13" MacBook Pro, 2.4GHz Core 2 Duo, 4GB RAM, 1TB HD) // BayPhone (iPhone 4, 32GB, black)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|