The return of the site search function

At last…after far too many months without one, I've finally written and made available a search function for the entries on cat.net.

True, anyone can have a search function, and normally it wouldn't be that big of a deal now to announce one (especially since there are plenty of places like Atomz and whatnot that provide this service for free), but it means a little more when you sat down and wrote it yourself on a Sunday afternoon.

Currently, the search function will only search entries on cat.net. I have plans to eventually build a bit more complexity into the code, so that you can choose to search either entries or comments (I suspect that doing both may be … entertaining) and perhaps boolean bits and whatnot.

Ah, well, it's a start. Go forth, search, conquer, play. Etc.

(Those of you using a skin with a customizable sidebar can click the "edit my sidebar options" link to be taken to the page with all available sidebar options.)

all tags: 

Comments

There's deffinatly something gratifying about writing your own code. I spent 3 days writing a commenting feature for my blog -- the code which i wrote for myself as well. God. The first day I spent wondering why it wasn't working, and then i realised that i forgot to modify the function that printed the entries to look for the comments. Then I got them working, at least, the comments were being displayed. Then I had to fix the edit-entry deal so i could edit the comments. There's deffinatly alot of redundancies and things that could be improved in the code, but i'm still basking in the glory of writing 10 lines of code, saving it, and then not seeing the infamous and evil "parse error." One of these sundays I'll have to sit down and clean up the code. Fortunatly, this sunday is not that sunday, and that sunday isn't scheduled around anything resembling now.

Sweetness. I've always just bitten my tongue whenever I've tried to search for something here. =)

Why not do a "keyword site:domesticat.net" on google? That's how I find things on my page. For instance, "ro-tel site:domesticat.net" finds me Joy's Spinach Dip and Hamburger Vegtable Soup. (To answer my own question, I just thought of a problem. If part of what you're searching for is on every single page then you'll come up with a lot of useless results (for instance, doing a search on 'code fu' doesn't just bring up stuff about code-fu, but photoshop-fu and smack-fu and anythingelse-fu because "code" is on every page, and so it picks up the extraneous fus. Of course, putting quotes around code fu in the search will bring back the right results.)

Yeah, now we don't have to use Google. I use Google to find stuff on my sites as John suggest, but that's because, well, I'm lazy and would never write in my own search engine. /me chuckles

I admit I've been sitting on this one for a while. I'd hoped that I'd come up with an easy solution for searching entries + comments + the external pages on cat.net, but that hasn't happened yet. I know how to do it, but I just haven't gotten around to making the table changes and whatnot to start the groundwork for it. I've also had an entries-only search function in the admin interface of Quarto for a while, so my immediate need was slaked. The search engine was the last big thing that I needed to have written prior to moving geek-chick.net over to Quarto. Now I have to be patient and wait for Gareth to fit me into his script-writing schedule to get the import script for g-c written. (Explanation: there's already one import script written for Quarto, but it assumes all entries are by the same author. This is not the case with g-c.)