Hacker News new | past | comments | ask | show | jobs | submit login
I made a 'search engine' for fun (foobub.com)
127 points by vu0tran on Oct 9, 2012 | hide | past | favorite | 66 comments



The website isn't meant to be used for any real utility. What I wanted to demonstrate was just an alternate way to look at search.

I think we've just gotten so used to Google and its millions of results; I wondered, what would happen if I took that all away and presented only just a small handful of results?


That's kind of exactly what I saw, and despite the lack of utility, I was like "Oh! This is nice!"


Sometimes minimal is best. Then again, Google does have the 'I'm feeling lucky' button - maybe that ought to just display a few results for them?

Either way, nice experiment!


The "I'm Feeling Lucky" button doesn't actually work anymore. :(


Yep however now you type what you want, it works some ajax magic, press tab to activate the keyboard shortcuts then hit enter which takes you to the first result.

I use it without thinking about it now and I don't need to touch the mouse bearing in mind I'm on the keyboard typing the search.


This actually seems quite nice for a slightly extended dictionary :).


Are you using search results from other search engines and applying some heuristics on that or have you mined your own web data. nice start though !!!


Add <!doctype html> and do <input id='search' name='s' placeholder='Type then hit enter' type='text' autofocus>


Thanks for the suggestion. It's in!


No, thank you! Much more usable now, there's also a couple other markup changes that need to be done, planning on open sourcing this?


Yeah. After I 'unshitify' a bit of it.


Try open sourcing it before it gets unshitty.

I'm trying it myself, just putting things out there and saying "to hell with it" because, ultimately, unshitifying things is Zeno's paradox kind of work; you're never really done. And, really, it's probably better than you think anyway.


The urge to move his <script> tags from under the <html> tags is killing me D:


Vu0tran, as you can see, others would be more than happy to help you with "unshitifying".


Which of Zeno's paradoxes are you alluding to? I can't find any that fits the analogy. (i.e. never-ending work due to perfectionism)


I think he's referring to the discrete-motion paradox - that you can never reach the other side of the room because you must first go halfway, and before that you must first go 1/4 of the way, and before that...

It's not the greatest analogy in the world, but it sort of works in that it illustrates the fractal-like nature of bug-squashing.


I'm confused, if this is a search engine, where are all the ads?


haven't hired the mbas yet :P


you made a search engine client, it's very different. A search engine is an index atop a corpus of content that you crawl.

It might be useful for you to look at jQuery Masony library for your presentation.


Yeah, I knew I must have been missing something. That's why I put "search engine" in quotes. :)


Are you crawling these sites yourself, or using the Bing API to get the index?


I'll get into more detail with a blog post tomorrow, but I just used Yahoo/Bing. It was a 3 hr project, figured I didn't need to reinvent the wheel :)


Are they charging you for requests (over the initial allotment of 5,000 requests per month), if this is done via Bing Web Search API in the Azure Marketplace?


iI felt the sameway . I just used various apis for unscatter.com you may want to see about getting access to the blekko api if you keep playing with it. iI use some of the slash tags they offer for some search views, it's real easy to work with.


When the search term is one character long (e.g., a single quote, or an ampersand, or whatever), it would be nice to get the corresponding Wikipedia page if it exists. It's pretty much impossible to google for special chars.


Searching for "foobub" on foobub.com gives http://www.google.com/search?q=foobub - clarification please?


My site does not SEO well.

If it's really confident about a result, it'll only give 1 or 2 results. i.e. http://foobub.com/?s=cats

If it's kinda confused, it gives multiple results and ranks the site by most likely: http://foobub.com/?s=what%20is%20the%20answer%20to%20life%20...

If it has no what you're doing, it'll search it on Google for you: http://foobub.com/?s=foobub

My website is not yet self-aware. No need to worry, guys.


It is unfortunate that doing so takes you away from the site (I imagine the basic use case right now is to type in a bunch of queries to see what it displays.)

Ideally, it would show Google search results in an iframe, although I imagine that is against their TOS. Maybe just linking to Google search results would be a better experience.


Or you can use a similar deal to what duckduckgo does.


if(input != found in index) redirect( google search )


This just redirected my search to Google. Edit: I see, it's a feature not a bug. My search results weren't found by foobub.


I thought this was going to be a search engine for things that are fun.


That'd be interesting. Maybe scrape twitter/facebook/etc for stuff correlated with "fun" and related words?


This is by far the thing I've upvoted on "new" that I'm most surprised reached the top page. I think this is borderline definitive proof that PG is right: Google is vulnerable. I mean, just the simplicity of the results has Hacker News excited, I just think 2 years ago we wouldn't have found this the least bit interesting.


Is there a way to exclude websites from results? Such as Quora?


Well done. I like how answers are given as tiles. Its a good experiment to try with nuuton. I do not like, however, that you did not serve too much from the classic search UI/UX. Shoot me an email: my username [at] nuuton [dot] com


I don't hate it!


Big surprise! Thanks! :)


It keeps telling me an apostrophe is the number 39. No, but seriously it looks neat. What are the websites it queries for results? I've seen Yahoo! and Wikipedia so far.


I replied to this above. Just:

'Wikipedia, Yahoo Answers, Google Answers (lawl), Quora, Stackoverflow.'

Stackoverflow comes up when you do coding questions, yahoo answers when you do just random questions. Although, Quora doesn't appear as often as I like. I need to do a bit of tweaking.

Here's an example where Quora comes up: http://foobub.com/?s=vu0tran


Pretty cool, I actually searched for Quora as one of the first queries and was surprised it showed up, now I see why!

I'm impressed with the results for most (obviously not esoteric) searches.

One thing: lots of URLs don't wrap or truncate, so you get some overflow, example: http://foobub.com/?s=how+is+babby+form


&#39 gives ' (ie it's the ASCII in hex of apostrophe)


Neat. So it just searches wikipedia?

If so, I can't really complain. 95% of my searches are followed by "wiki" normally so I can get wikipedia first.


Wikipedia, Yahoo Answers, Google Answers (lawl), Quora, Stackoverflow.

Try putting in a coding question and Stackoverflow will show: http://foobub.com/?s=python+xrange+vs+range

If you put in a random question, yahoo answers will probably appear: http://foobub.com/?s=why+does+sweat+smell+so+bad

Wikipedia just generally comes up first as the way it's weighted. It answers and provides knowledge for most queries.


I searched for "ruby on rails" and it got me wiki and quora, but not stackoverflow, which I would expect. See: http://foobub.com/?s=ruby+on+rails

Also, searching for "stackoverflow" gives unexpected results: http://foobub.com/?s=stackoverflow

Otherwise, surprisingly useful for something so simple. If you could tone down/up result sources and it had more (e.g. show me nothing from yahoo answers, more from stackoverflow), i would concievably use this instead of the goog for most things.

Like many people most of my googles are "wiki blah"

Good job!


I thought I was the only one who does this. There should be an easier way..


In chrome, go to settings > manage search engines. Add a new engine with the parameters:

   name:wiki
   keyword: w
   URL: http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=inurl:en.wikipedia %s&btnI=745
Once saved, in chrome's address bar type "w foo" and press enter and you'll go directly to the wikipedia article on foo

By routing through google, it's also much more tolerant of misspellings.


If there's a wikipedia page for your search term then generally duckduckgo shows it at the top - also http://enwp.org/Article_Name is nice.


You can do the same in Firefox by going to wikipedia, right clicking the search bar, "add a keyword", make the keyword w, and save it as a bookmark.

That way you don't need to search through google, you can search directly. Works with most search boxes.


I made something similar to foobub which takes you to wikipedia on exact title matches: http://s.xqz.ca/ I use it primarily from my URL bar.


I used to append "wiki" to >90% of my searches as well. Finally got in the habit of using DuckDuckGo bang syntax now.

  w! <query>


Chrome and Firefox can do this too and it's easy so I don't get the reliance on DuckDuckGo for it.

In Firefox you go to the wikipedia page, right click on the search text box, then "Add Keyword for this Search". In Chrome, you do the same thing, right click on that search box and then click "Add as Search Engine".

You can add whatever keyword you want, like "w" and from then on, all searches with "w " as a prefix will go straight to Wikipedia's results.

I have shortcuts defined for Wikipedia, Stackoverflow, Amazon.com, IMDB, a dictionary for my native language, my personal Gmail, my work Gmail, Google Translate and Hacker News.

For instance for Hacker News, I often want to search for articles I've read here, not to mention it's a valuable resource for getting other people's opinions on certain subjects. So instead of searching on Google for:

     some topic site:news.ycombinator.com
I defined a prefix for this search "hn", and so I simply type "hn some topic". You can't use the shortcut for this though, you'll have to go to Settings and manually add a search engine setting.

For Google Translate, I basically type "enro phrase", for translating "phrase" from English to Romanian, while I type "roen phrase" for translating "phrase" from Romanian to English.

Can DuckDuckGo do that?


Huh. This is actually rather good for programming searches; surfaced some useful things I hadn't seen before. Bookmarked. Thanks!


You might want to sanitize the placeholder attribute on the results page - in its current state, it is susceptible to XSS.


Thanks for the tip. I was trying to remember what XSS was.

http://foobub.com/?s=xss

Bam. Foobub.


Hey, what does the backend look like?


Hi, since there seems to be a lot of interest, I figured I could answer all of them at once in a blog post which I'll post sometime tomorrow.

To answer your question though, the backend is running on Python. There's no particular reason. I just find it a lot easier to script with. It's running on fCGI with nginx on the backend server. On the front is PHP... which is served through up by apache. I find it easier for me to do $_GET, hack around forms really fast and also just echo Javascript everywhere.


Odd. The auto complete in Chrome shows me the WordPress extensions I have installed on my sites.


It's nice to think of a search engine as something that can actually be tuned to a desired output. Nice to see. You're absolutely right that we have come to think of this problem as solved, and it isn't.


Neatly done... It's a great hack in 3 hours... Would love to learn about it, if the code is open sourced. Only one suggestion, results could be listed neatly. That's it.


Neat, would like to see the code. If you're crawling sites yourself, that would be really interesting. Nice work.


I did something a little bit similar when I made www.eaisy.com. I like a minimal interface.


That’s really nice. My only gripe is that I find the definition font really hard to read.


Youch... inline styling and javascript outside of the closing </html> tag..


The simplicity of this makes it enjoyable. Great work!


You hijacked my middle-click to open in same tab instead of another one. Gah!

Otherwise, very good work. I was suprised it can even do simple sentence-search.

How did you make this, what is the backend?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: