how to create, in 5 minutes, your own convenient search engine

14
How to create, in 5 minutes, your own convenient search engine for Rails topics on the Web that is in many cases more useful than raw Google by Tom Elam, about.me/tomelam Tuesday, 14 May 13

Upload: thomas-elam

Post on 19-May-2015

116 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: How to create, in 5 minutes, your own convenient search engine

How to create, in 5 minutes, your own convenient search engine for Rails topics on the Web that is in many cases more useful than raw Googleby Tom Elam, about.me/tomelam

Tuesday, 14 May 13

Page 2: How to create, in 5 minutes, your own convenient search engine

This presentation can be found at http://slideshare.net/tomelam.

Tuesday, 14 May 13

Page 3: How to create, in 5 minutes, your own convenient search engine

Start with Google CSE

(Search “Google CSE”)

Tuesday, 14 May 13

Page 4: How to create, in 5 minutes, your own convenient search engine

Go to http://google.com/cse

Tuesday, 14 May 13

Page 5: How to create, in 5 minutes, your own convenient search engine

The basics

• Filters out noise.

• Is specific to one or more websites.

• Allows automated use of search operators. (See http://goo.gl/JnLQQ.)

• Has an API.

• Is reusable software.

A Google Custom Search “engine”:

Tuesday, 14 May 13

Page 6: How to create, in 5 minutes, your own convenient search engine

Just like they said ...

A blog ...

Tuesday, 14 May 13

Page 7: How to create, in 5 minutes, your own convenient search engine

Documentation (lots) ...

Tuesday, 14 May 13

Page 8: How to create, in 5 minutes, your own convenient search engine

FAQs ...

Tuesday, 14 May 13

Page 9: How to create, in 5 minutes, your own convenient search engine

And a forum ...

Tuesday, 14 May 13

Page 10: How to create, in 5 minutes, your own convenient search engine

Extras

•Create a CSE on the fly on your own blog or website.•Create “linked” CSEs dynamically, on the fly, programmatically, anytime, as often as you want!•Submit on-demand indexing requests (one per day).•Use RESTful requests to query, using JSON or Atom.•Filter and sort results.•List search term synonyms for a CSE.

Tuesday, 14 May 13

Page 11: How to create, in 5 minutes, your own convenient search engine

CSE Setup

Tuesday, 14 May 13

Page 12: How to create, in 5 minutes, your own convenient search engine

Code<html><head> <title>My CSEs</title></head><body><script> (function() { var cx = '012478012240372427082:jzire_jwgwk'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })();</script><gcse:search></gcse:search></body></html>

Tuesday, 14 May 13

Page 13: How to create, in 5 minutes, your own convenient search engine

Result

Tuesday, 14 May 13

Page 14: How to create, in 5 minutes, your own convenient search engine

It Works!

Tuesday, 14 May 13