Build a Custom Search Engine for Game of Thrones Data

Share this post:


A Lannister always pays his [technical] debtParaphrase of unofficial House Lannister motto

Search engine architectures are rarely as straightforward as you’d expect. Before you can start having fun with your data (such as Game of Thrones character info), there are a lot of components you need to consider to ensure the best overall performance and developer experience:

  • What kind of database will you use?
  • Will you cache results?
  • What search library will you use?
  • Will you expose facets?
  • What does the UI look like?
  • Does it scale?!

Reducing this complexity is the goal of the Simple Search Service example app, from my colleagues on the IBM Cloud Data Services developer advocacy team. Simple Search Service takes data that you’ve dumped into a CSV or TSV file and creates a faceted search API that’s designed to work well with any web or mobile app. The code is open source in the ibm-cds-labs/simple-search-service project on GitHub, and it deploys to Bluemix at the click of a button.

Simple Search Service exposes a pleasant search API and web interface

Simple Search Service is powered by the IBM Cloudant JSON database to build full-text search indexes, and the service uses a Redis key-value store on the IBM Compose database platform to cache results. A Node.js runtime on Bluemix comprises the rest of the back end. The result is a REST API for queries, and an infrastructure that scales.

House Words: full text search for GoT data

To introduce Simple Search Service, we’ve published recent articles on importing game of thrones data and hooking up an easy UI. The articles walk you through code that Glynn Bird and Va Barbosa wrote to produce the GoT character search engine you’ll find at

Prototype of the GoT character search front end
An early draft of Va’s front end. See the finished version here.

The API handles free text searches, like the one above that returns any instance of the string "Frey". If you want to get fancier, you can use the API to restrict queries to specific fields and combine those conditions. For example, try searching for culture:"Northmen" AND books:"A Clash of Kings" to find all the Starks and their subjects who appear in George R.R. Martin’s second book.

For more on the Simple Search Service, read Glynn’s introductory tutorial, or trace the code on GitHub. Remember: Winter is coming. So brush up on those royal houses of Westeros!

Data in this example app is processed from An API of Ice and Fire. Copyright: The ‘A Song of Ice And Fire’ series and its data is the property of George R.R. Martin. The data is used without claim of ownership.

More How-tos stories
April 30, 2019

Introducing IBM Analytics Engine v1.2 and Announcing the Deprecation of IBM Analytics Engine v1.0

We are excited to inform you about the new version of IBM Analytics Engine v1.2 that will be available starting May 15, 2019. Along with this release, Analytics Engine v1.0 will be retired.

Continue reading

April 16, 2019

Announcing the Deprecation of the Decision Optimization Beta Service

The End of Beta date for the Decision Optimization service is May 17, 2019. The End of Beta Support date is June 20, 2019.

Continue reading

April 2, 2019

Data Refinery and Profiling Changes in Watson Studio and Watson Knowledge Catalog

We'd like to announce data refinery and profiling changes related to Watson Studio and Watson Knowledge Catalog that will take effect on May 17, 2019.

Continue reading