This November, TripAdvisor's Ottawa engineering team was happy to participate in deCODE 2015, a two-day hackathon run by the Legacy Conference which brought together local Ottawa tech companies and students from the University of Ottawa, Carleton University, Algonquin College, and University of Waterloo. The workshops at deCODE are structured to allow tech companies to pose a design challenge to a cross-domain team of students, and let the students collaborate towards building a solution.

TripAdvisor's workshop focused on deploying ElasticSearch, an open-source product for high-performance full text search, and using it to build, from scratch, a local restaurant search engine, using data from TripAdvisor's API. I was incredibly impressed with what the student team was able to put together in just a short weekend. ElasticSearch is admittedly a complex product, but it's easy to use for basic full-text search use cases, comes with sensible defaults, and the system installation, indexing, and query development for simple text search are all within reach for a 48h hackathon.

After indexing 2,100 Ottawa restaurants into ElasticSearch, the team learned about full-text search, matching user query terms against all the data collected about the indexed restaurants. We challenged the students to come up with a better approach than simply matching the query against restaurant names (that would be a trivial, and not very useful, implementation of a Point-of-Interest search engine.) Through some brainstorming, they took the view that the more reviews for a restaurant mentioned the user's query terms, the more relevant that restaurant was to their query (thus leveraging user feedback and user-generated content for ranking restaurants in response to a query).

With a bit of experimentation with query scoring, the student teams settled on an appropriate weighting of matches in the restaurant name fields and reviews, and experimentally validated this scoring on sample queries. They were then able to build a web interface running on node.js to display the results, and put together an impressive demo.

Useful Tools and In-Event Communication

We couldn't have experienced this level of success under such a compressed timeline without relying on a few essential tools, all of which fit their purpose well.

Github

I setup a new organization a week before the event, and invited all students as members of the organization. This gave us a central place to sync up to share code, documentation, and assign issues. Most engineering students were already familiar with basic usage of git, and for those that weren't, TripAdvisor staff was available to provide coaching.

DigitalOcean (or any cloud VM provider)

Instead of attempting to run ElasticSearch and server infrastructure on a laptop on a University's wireless network, better to centralize these services on a machine in a reliable data centre. A few days before the event, we provisioned some blank Ubuntu VMs on DigitalOcean, and pre-installed Java and configured the firewall, so that at the event itself, all that was left to do would be setting up and starting ElasticSearch. This worked very well, and with hourly pricing, was a very cost-effective way to create a playground for students to learn that could be easily cleaned up afterward.

Slack

This was our main communication channel throughout the event - private realtime chat for all attendees, and integration with GitHub made it easy to keep track of when new code was pushed to our repository.

Our warmest thanks goes out to the organizers of deCODE, Carleton University's Hatch for hosting, and all the students who took time out of their Fall term to participate.