Aggregate and query information from web portals

 Aggregate and query information from web portals


In this code pattern, build an application that uses IBM® Watson™ Discovery service APIs to create, query, get a status, and delete a document collection of web portals. The application renders the query results on a custom-built web user interface. This provides flexibility for an app developer to design and build the web user interface to suit specific information and visualization requirements.


There is a lot of information on the internet, and people are always interested in getting information relevant to them. Two common scenarios drive the need for it:

  • There is usually a specific item of interest, and you want to get all of the relevant information about the item
  • You have a question and are searching to find the answers for it on the internet

This code pattern addresses the previous scenarios where you want to query for relevant information from a group of internet pages. Watson Discovery provides the ability to crawl through web pages and build a queryable collection. You use this feature to build an application where you can:

  • Specify a list of URLs that Watson Discovery will crawl to build the collection
  • Specify a query in natural language and get relevant results with insights from Watson Discovery
  • Visualize the top five matching documents, passages, and entities for the query

When you have completed this code pattern, you understand how to:

  • Create a collection using a web crawl
  • Get the status of a collection
  • Query the collection using natural language
  • Delete a collection
  • Parse, read, and visualize the results from Watson Discovery


Retrieve and visualize relevant information flow

  1. The user requests a creation, status, or deletion of a collection, or queries a collection through a custom-built web UI.
  2. The request is sent to a server application on the cloud.
  3. The application invokes an API on the Watson Discovery service using the Watson SDK.
  4. The Watson Discovery service processes the results and sends it back to the application. The results are then visualized by the user.


Find the detailed steps for this pattern in the readme file. The steps will show you how to:

  1. Clone the GitHub repository.
  2. Deploy the application.
  3. Analyze the results.



Related post