Archive for June, 2011

I love to listen music while coding. First of all it helps me block out external distractions and secondly it makes me concentrate better.

Though i prefer instrumental music while coding, its good to get pumped up with couple of songs :


Queen – We Are The Champions

Now time for some instrumental music

P.S. list is full of unconventional music

Death Note Soundtrack – L’s Theme 

First one is L’s theme from Death Note, absolute EPIC !!

Requiem for a Dream – soundtrack

This one is from the movie Requiem for a dream, one of my all time favorite.

Ewan Dobson – Time 2 – Guitar

The Arrancar Theme

Spanish classical guitar from anime Bleach

Metallica – Call of Cthulhu 

Masterpiece from Metallica

Epic Trance Techno- Fantasy

Inception Soundtrack-Dream is Collapsing

Santana – Europa

Godot – The Fragrance of Dark Coffee

This theme combined with forms an awesome combo.

The Matrix Soundtrack – Clubbed to death

Apocalyptica – Quutamo live

Half life 2 – Vortal Combat

Lastly, an awesome soundtrack from Half life 2

Also there are some good soundtracks here . Also some of them like Fur Elise and Clair de Lune didn’t qualified cause it is difficult to not get lost in them.


Here is a short intro on using elasticsearch filters with java.

Combining filters

        XContentFilterBuilder filter1 = FilterBuilders.orFilter(
				FilterBuilders.termsFilter("foootnote", "searchKeyword"))
//filter name can be used later to find matched filter
		XContentFilterBuilder filter2 = FilterBuilders.orFilter(
				FilterBuilders.termsFilter("receiverNumber", "searchKeyword"))

        XContentFilterBuilder filter33 = FilterBuilders.orFilter(
        		FilterBuilders.termFilter("messageText", "searchKeyword"),
        		FilterBuilders.termFilter("messageSubject", "searchKeyword").

        // These filter can then be combined using one more filter
        XContentFilterBuilder messageFilter = FilterBuilders.orFilter(filter1, filter2, filter3);

Checking for presence of a keyword( i.e. NOT NULL)

Here’s an example in which a filter is created to check for the existence of a keyword “hiddenTag”.

XContentFilterBuilder existsFilter = FilterBuilders.notFilter(
//This filter can then be combined with other filters like below
messageFilter = FilterBuilders.andFilter(messageFilter, notExistsFilter);


By default only 10 results are returned. To return more results and apply pagination we can build our query like this :

qb = QueryBuilders.filteredQuery(qb, messageFilter);