Apache Solr is an open source search server. It is based on the full text search engine called Apache Lucene. So basically Solr is an HTTP wrapper around an inverted index provided by Lucene. An inverted index could be seen as a list of words where each word-entry links to the documents it is contained in. That way getting all documents for the search query "dzone" is a simple 'get' operation.
One advantage of Solr in enterprise projects is that you don't need any Java code, although Java itself has to be installed. If you are unsure when to use Solr and when Lucene, these answers could help. If you need to build your Solr index from websites, you should take a look into the open source crawler called Apache Nutch before creating your own solution.
Thursday, November 1, 2012
Friday, October 19, 2012
Unzipping a bz2 file without deleting the original file
To uncompress a bzip2 file, execute the following command
#bunzip2 filename.txt.bz2 (where filename.txt.bz2 is the name of the file you wish to uncompress)
The result of this operation is a file called filename.txt. By default, bunzip2 will delete the filename.txt.bz2 file.
Use -k to keep the original file intact, so the command becomes something like this:
#bunzip2 - k filename.txt.bz2
Thursday, October 11, 2012
Create and Extract .bz2 and .gz files
#apt-get install bzip2
Installing bzip2 in ubuntu
sudo apt-get install bzip2
Uncompressing a bzip2 File Using bunzip2 in Debian
To uncompress a bzip2 file, execute the following command
#bunzip2 filename.txt.bz2 (where filename.txt.bz2 is the name of the file you wish to uncompress)
Installing stemming porter library python
From the following URL download the egg file:
http://pypi.python.org/pypi/stemming/1.0.1
Once you have the file run the following command
sudo easy_install filename.egg
There you go :)
http://pypi.python.org/pypi/stemming/1.0.1
Once you have the file run the following command
sudo easy_install filename.egg
There you go :)
Wednesday, October 10, 2012
Changing the navbar color in Bootstrap
The best way currently to do the same would be to install LESS command line compiler using
$ npm install -g less jshint recess uglify-js
Once you have done this, then go to the less folder in the directory and then edit the file variables.less and you can change a lot of variables according to what you need including the color of the navigation bar
@navbarCollapseWidth: 979px;
@navbarHeight: 40px;
@navbarBackgroundHighlight: #ffffff;
@navbarBackground: darken(@navbarBackgroundHighlight, 5%);
@navbarBorder: darken(@navbarBackground, 12%);
@navbarText: #777;
@navbarLinkColor: #777;
@navbarLinkColorHover: @grayDark;
@navbarLinkColorActive: @gray;
@navbarLinkBackgroundHover: transparent;
@navbarLinkBackgroundActive: darken(@navbarBackground, 5%);
Once you have done this, go to your bootstrap directory and run the command make.
Subscribe to:
Posts (Atom)