Skip to content
Steve Martinelli edited this page Mar 26, 2018 · 6 revisions

Short Name

Develop a fully featured web app built on the Watson Discovery Service

Short Description

In this Code Pattern, we walk you through a working example of a web application that queries and manipulates data from the Watson Discovery Service. This web app contains multiple UI components that you can use as a starting point for developing your own Watson Discovery Service applications.

Offering Type

Cognitive

Introduction

The main benefit of using the Watson Discovery Service is its powerful analytics engine that provides cognitive enrichments and insights into your data. This app provides examples of how to showcase these enrichments through the use of filters, lists and graphs. The key enrichments that we will focus on are:

  • Entities - people, companies, organizations, cities, and more.
  • Categories - classification of the data into a hierarchy of categories up to 5 levels deep.
  • Concepts - identified general concepts that aren't necessarily referenced in the data.
  • Keywords - important topics typically used to index or search the data.
  • Sentiment - the overall positive or negative sentiment of each document.

Authors

By Rich Hagarty

Code

Demo

  • N/A

Video

Overview

In this developer journey, we will create a Node.js web app built on Watson Discovery. Through the use of various UI components, this app will demonstrate how to extract and visualize the enriched data provided by the powerful Watson Discovery analytics engine.

When the reader has completed this Code Pattern, they will understand how to:

  • Load and enrich data in the Watson Discovery Service.
  • Query and manipulate data in the Watson Discovery Service.
  • Create UI components to represent enriched data created by the Watson Discovery Service.
  • Build a complete web app that utilizes popular JavaScript technologies to feature Watson Discovery Service data and enrichments.

Flow

  1. The Airbnb review json files are added to the Discovery collection.
  2. The user interacts with the backend server via the app UI. The frontend app UI uses React to render search results and can reuse all of the views that are used by the backend for server side rendering. The frontend is using semantic-ui-react components and is responsive.
  3. User input is processed and routed to the backend server, which is responsible for server side rendering of the views to be displayed on the browser. The backend server is written using express and uses express-react-views engine to render views written using React.
  4. The backend server sends user requests to the Watson Discovery Service. It acts as a proxy server, forwarding queries from the frontend to the Watson Discovery Service API while keeping sensitive API keys concealed from the user.

Included components

  • Watson Discovery: A cognitive search and content analytics engine for applications to identify patterns, trends, and actionable insights.

Featured technologies

  • Cognitive: Watson is a cognitive technology that can think like a human.
  • Node.js: An asynchronous event driven JavaScript runtime, designed to build scalable applications.

Blog

Links

Clone this wiki locally