Archive for the ‘search’ Category

Make your own Google

Tuesday, October 24th, 2006

Google Co-op allows you to create your own search engine. You specify a list of sites and are given a home-page which lets you use Google to search just that list or the whole web but with an emphasis on those sites.

This is really useful for specialists or groups of people who have a set of quality sources on a given topic. e.g. Ruby on Rails developers or horticulturalist. Google Co-op lets just one person or a group of invited people to contribute to the list.

I think it is even more useful as a personal search engine. Here I have created a search list that searches just my resources on the web. It includes my Flickr photos, my del.icio.us and Blinklist links and my blog. Other people can use it but it is more useful to me as a way to pull out past things I have written about, photographed or linked to.

Rollyo does much this but I found their interface a bit complicated and it wasn’t using the great Google search engine.

RailsConf Europe 2006: Unobtrusive Ajax with Dan Webb

Friday, September 15th, 2006

(code and slides)
Dan Webb’s Unobtrusive Ajax With Rails talk proved so popular yesterday that it is being redone in the main hall during lunch today.

Unobtrusive Ajax (or JavaScript really) is all about removing all those inline onclick=”return myFunc(an_id)” bits of code from your HTML and into your JS. Separating behaviour and mark-up. Attaching behaviour to your class definitions e.g. class=”productbutton”.

At the very least this makes your pages smaller (think of a 1000 item list which has onclicks inline vs. attached via a class in a separate JS.)

At the most it is the idea of the class assigned to HTML elements.

A big theme is graceful degredation for when JS is not available.

A good point is around a href=”#” which semantically and functionally doesn’t make sense. I am an offender here but aim to change.

button_to is a little known Rails helper that generates a button in a form. This is for when you should be using buttons and not links e.g. for delete links. Remember, links should not have side effects (if for no other practical reason than avoiding pre-fetch technologies like the Google Toolbar that will wipe your records.)

To get started with UJS checkout the Rails plugin at ujs4rails.com.

A good talk and as Dan says, it isn’t rocket science. It has obvious benefits even if you don’t care about semantics. Hopefully Rails takes the ideas into the trunk.

RailsConf Europe 2006: Search with Rails

Friday, September 15th, 2006

(slides)

Now at the shopping.nouvelobs.com ecommerce talk which is a large news site in France. Speaker is Gwendal Rou, very French.

ModelSearch is an extension of find that allows something like this:

search = ProductSearch.new()
search.buyable = true
search.Find(:all)

The idea is that searching with multiple columns is not at the usual high-level in Rails. You have to use SQL.

ModelSearch is capable of; Televisions costing less than 300, sorted by price.

search = ProductSearch.new
search.keyword - 'television'
search.max_price = 300
search.sort = :price
search.find(:all)

That is quite handy. I assume ‘max_’ is dynamically added onto model members. i.e. I assume you could have min_price too. My assumption is nearly correct, you just need to set it up in the model a bit.

A further extension lets you pass the search object into the normal model find e.g. Product.find(:all, search.find_options)

ProductSearch is a class you subclass from ModelSearch and setup with various params. e.g. search_key :keyword, :search => :keyword, in => [:name, :description]

All nicely model based this. Buyable, from the first code, is a custom method in the ProductSearch model. It works well with a form, letting you just pass in properly named input fields.

ModelSearch is planned for release soon.

All in all a nice bit of code for real world problems.

Delicious full text search

Sunday, August 20th, 2006

A friend has a really good idea. Allow users to do a full-text search across the sites they have bookmarked. Wether that be your Firefox/IE bookmarks or your del.icio.us/Blinklist links. With systems such as Rollyo this would not be hard to do.

Rollyo is a good idea but I never use it as the link between the sites I visit and value and the sites in my custom Rollyo search engine is not automatically updated. If Rollyo would monitor my Blinklist links adding sites as I blink them I’d have good reason to use Rollyo. Integration into Firefox(through the search textbox top right) or Blinklist would be ideal.

(Rollyo does have a “bookmark importer” tool but it isn’t automatic and only works with your Firefox bookmarks, not del.icio.us and co.)

Personal Google Search Trends

Friday, August 18th, 2006

If you have a google account and allow Google to record your searches you can go to google.com/searchhistory/trends to view your own search trends. Interesting stuff though not wholly accurate as my top queries seem a bit wrong and I can’t ever remember searching for Teen Tigers (a porn site it turns out.)

Quintura

Friday, August 11th, 2006

Quintura is an interesting search tool. You enter in a word or phrase and it then clusters related words around it. e.g. Enter in Ruby and you get Rails (as in Ruby on Rails) as well as ruby the precious gem. In this case I wanted Ruby on Rails so I clicked Rails and now my phrase is Ruby Rails and any related words to that phrase are then shown. You can then hover over these words and further relations are shown.

The bit that I really liked was that Quintura doesn’t reinvent the search engine. It works off of your favourite one, be it Google, Yahoo! or a host of others.

The UI is slick and easy to use. Results are returned quickly. Installation was a breeze and overall it feels like a professional application.

I’d like to see a web-based version of this, something that sits inside my browser which would make following result links easier.