Building search engine with Xapian and Omega

In search engine on December 27th, 2009

Few days before, I was playing with some interesting tool i.e. Xapian and Omega. What is Xapian and Omega? Well, Xapian is open source search engine library. Omega is search application build on top of Xapian, basically it’s cgi scripts (binary).

XapianIf you are new (like me ;-) ) and do not know about Xapian, you might want to have look on this  linhttp://xapian.org/users. This tells who are using Xapian and you can figure out weather it fits you or not. But don’t afraid installation and using Xapian is very easy.

If you want to know more about it, point your browser http://xapian.org/docs. Also you can find lots of examples and articles about Xapian in the internet, google or bing Xapian, Omega. I’ll give you two links which I found helpful during  my work.

  1. http://tinyurl.com/yd433ms – this tells you how to build index from MySQL database and search using PHP.
  2. http://tinyurl.com/yhk96ab – this tells you how to build index from files and and search using Omega.

For first, you need to install php bindings.

Installing Xapian, Omega and bindings
Installation is very easy. Ubuntu and Debian users, simply do $sudo apt-get install Xapain (though I haven’t tried this, not sure how it goes). I install from source, that’s perfectly works.

  1. Download source from http://xapian.org/download (you can skipe Search::Xapian)
  2. Follow the installation instruction http://xapian.org/docs/install.html

Note: When you fire make command, it gonna take really long time (more then you can imagine), don’t panic, it’s on the right way. Go get two cup of coffee, yes I said 2!

Bonus: Boss of yahoo! BOSS Vik Singh has written this article, you might want to check http://tinyurl.com/nsqbt9

Debian or Ubuntu – build essential for develoepr

In Linux on December 7th, 2009

Compiling source code and creating build is not easy in Linux box. If you are developer and new to Debian or Ubuntu machine, following command may interest you.

sudo aptitude install build-essential

What does it do? It actually install all c/c++ compiler which are necessary to compile source. You can give try.

Suppose you have create helloword.c file. Just do this

cc -c helloworld.c
cc -o helloword helloworld.c
./helloworld

Instead, if you have helloworld.cpp (C++ code)

g++ helloworld.cpp -o helloworld
./helloworld

Happy programming!!