Twitter Search Jetwick – Powered by Wicket and Solr
Join the DZone community and get the full member experience.Join For Free
today we released jetwick . with jetwick i wanted to realize a service to find similar users on twitter based on their tweeted content. not based on the following-list like it is possible on other platforms:
not only is the find similar feature is nice, also the topics (on the right side of the user name; gray) give a good impression about which topic a user tweets about. the first usable prototype was ready within one week! i used lucene , vaadin and db4o . but i needed facets so i switched from lucene to solr . the tranformation took only ~2 hours. really ! test based programming rocks ;-) !
after this something went wrong with the db. it was very slow for >1 mio users. i tweaked to improve the performance of db4 for at least one week (file >1gb). it improves, but it wouldn't be sufficient for production. then i switched to hibernate ( yesql !). this switch took me another two weeks and several frustrating nights . db4o is so great! ok, now that i know hibernate better i can say: hibernate is great too and i think the most important feature (== disadvantage!) of hibernate is that you can tweak it nearly everwhere: e.g. you can say that you only want to count the results, that you want to fetch some relationships eagerly and some lazily and so on. db4o wasn't that flexible. but hibernate has another draw back: you will need to upgrade the db schema for yourself or you do it like me: use liquibase , which works perfectly in my case after some tweeking !
now that we had the search, it turned out that this user-search was quite useful for me, as i wanted to have some users that i can follow. but alpha testers didn't get the point of it. and then, the shock at the end of july: twitter released a find-similar feature for users ! damn! why couldn't they wait two months? it is so important to have a motivation ... :-( and some users seems to really like those user suggestions. ok, some users feel disgustedly when they recognized this new feature. but i like it!
btw: i'm relative sure that the user-suggestions are based on the same 'more like this' feature (from lucene) that i was using, because for my account i got nearly the same users suggested and somewhere in a comment i read that twitter uses solr for the user search. others seems to get a shock too ;-)
then after the first shock i decided to switch again: from user-search to a regular tweet search where you can get more information out of those tweets. you can see with one look about which topics a user tweets or search for your original url. jetwick tries to store expanded urls where possible. it is also possible to apply topic, date and language filters. one nice consequence of a tweet-based index is, that it is possible to search through all my tweets for something i forgot :
or you could look about all those funny google* accounts .
so, finally. what have i learned?
from a quick-start project to production many if not all things can change: tools, layout and even the main features ... and we'll see what comes next.
Opinions expressed by DZone contributors are their own.