Tornado – Whoosh – MoreLike and MoreLikeThis

Like other search engines, Whoosh too provides more_like() and more_like_this() methods to find similar documents in the index, Typically, morelikethis doesnt execute any special query to get the list of similar documents to the one specified, but in fact it searches all other documents in the index relative to the document content that is specified. … Continue reading Tornado – Whoosh – MoreLike and MoreLikeThis

Tornado – Static File Handler

Trouble accessing favicon or css or other web page images with Tornado? Well here's the solution. Tornado provides tornado.web.StaticFileHandler construct that helps the web server locate images or icon files to be served while loading the web page. Here's an example https://gist.github.com/3205067.js In this example, articles.html is loading images/images.jpg. Path images/* is understood by Tornado … Continue reading Tornado – Static File Handler

Tornado – MongoDB

Yes, Tornado gells well with many databases like mysql, sqlite and mongodb. Below is an example of database connectivity and interaction with MongoDB from Tornado. In this example, the user or client connects MongoDB database : library and collection: articles )with HTTP requests. get() - displays the records of mongodb collection with article id post() … Continue reading Tornado – MongoDB