Monday 14 September 2009

More looking at search

Yesterday I was trying to find out how Wordpress' search function works in the hope I could write something similar for the rest of my photo website.

Doing some googling, I found this post Make WordPress' search function suck Less (must admit, I haven't actually used Wordpress' search function, so didn't actually know it wasn't meant to be any good).

Anyway, following on from there I found a Wordpress search plugin called wpSearch, which according to the info:
wpSearch is a very powerful search plugin for Wordpress. It is based on the open source search engine "Lucene" which means its fast and relevant. If you need an awesome blog search, you've come to the right place.
So next I searched for Lucene, and found this post Creating A Fulltext Search Engine In PHP 5 With The Zend Framework's Zend Search Lucene.

Reading through that article it seemed like all it does is to take info already existing in your mysql database, and then index it itself.

So I looked on the mysql website, and found out how to search text fields using mysql. I spent quite a long time reading the various pages and comments on the MySQL Full-Text Search Functions this morning.

One of the comments near the bottom of the main MySQL manual page on Full-Text Search Functions, suggested using Sphinx, so I took a look at that. After installing it, I spent most of this morning and this afternoon trying to work out how to write the MySQL query needed to get Sphinx to index all the database fields I wanted to be searchable.

As an aside, I also noticed that the mnogosearch domain seems to have expired, not sure if they're not working on it any more.

As well as trying to work out the MySQL query I needed, after lunch I also went on Animal Crossing. Sahara was there, but only one Animal had any old wallpapers they would give me. I already had 2 old wallpapers though from Sahara's previous visits, so I took the three wallpapers to Sahara and got a rare wallpaper in extension.

After dinner I did some Japanese with Moccle. I did some work trying to use Sphinx, watched The Gadget Show with Rad, watched a bit The Ballad Of Narayama (1983 version), and did some more japanese with Moccle.

The weather was overcast all day today, though the cloud started to break around sunset, resulting in a nice sunset.

Food
Breakfast: Lemon marmalade toast sandwich; cup o' tea.
Lunch: Mature yet mellow cheddar cheese with iceberg lettuce sandwich; 2x plums; clementine; Rocky; cup o' tea.
Dinner: 1⅓ Sausage roll; mashed potato; baked beans; brown sauce. Pudding was pluk crumble with custard. Coffee.

No comments: