Built-in widgets

IBM Watson® Explorer oneWEX Application Builder ships with a set of built-in widgets you can use to display information in your application. The properties of these widgets are described here.

To edit the properties of a widget, click the top row of a widget and click Edit (). A sidebar opens with the properties for this widget. These properties vary depending on which type of widget you are editing.

General properties

The following properties are common to some widgets.

Show widget frame
Specify whether the widget frame, which has a title bar with minimize and maximize icons, should be displayed.
Show border
Specify whether the widget frame should have a visible border. Only available if Show widget frame is selected.
Title
Provide a widget title shown on the title bar. If empty, the widget's title bar is not displayed. Only available if Show widget frame is selected.
Hide if no content
Specify whether to hide the widget if no content is to be displayed.

Layout widgets

The following widgets are available in the Layout page.

Table 1. Layout widgets
Widget Description and properties
Search Input () Create a search box.
Placeholder text
Specify the text to be displayed in the search input field.
Natural language query
Specify whether to use natural language query. Administrators can customize natural language query in the Exploration tab of Collection edit page of the Admin Console or Content Miner.
Auto completion
Specify whether to auto complete the text in the search input field.
Applies to version 12.0.2.2 and subsequent versions unless specifically overridden Initial query
Query that will be set in default.
Applies to version 12.0.2.2 and subsequent versions unless specifically overridden Execute query at startup
If this flag is on, the query set as Inital query will be executed when page is loaded.
Data sources to search
Select the data sources to execute the query. You can execute search on multiple data sources at once.
HTML () Display HTML content.
HTML
Specify HTML content to be displayed. Script tags, script code, or event handlers are not allowed.
Image () Display an image.
Image path
Specify image path. Image path can be full URL like http://hostname/image.png if you want to display external server images. Or you can select from uploaded images from the Select from uploaded images drop-down list. When you select an image, the image path is set automatically.
Upload images
If you click Upload images, you can upload an image from your local file system.
style
You can specify CSS styles using the JSON format. For example,
{ "border": "1px solid black", "width": "320px", "height": "240px"}

Applies to version 12.0.3 and subsequent versions unless specifically overridden Image files uploaded by the Image widget are stored in an internal database as binary data. If you want to access image files located in the local file system, you can place the images in the /wexdata/appbuilder/images directory inside the docker container. Then the images can be accessed as /builder/data/images/static/*. For example, if you put /wexdata/appbuilder/images/example.png, then you can access it by setting Image path as /builder/data/images/static/example.png.

Navigation () Add links to other pages in this application.
Style
Select a style for the page navigation control.

Basic widgets

The following widgets appear in the Basic set of built-in widgets. See the previous section for descriptions of the Search Input, HTML, and Image widgets.

Table 2. Basic widgets
Widget Description and properties
Result List () Display search results.
Layout template
Select a layout template. For more information, see Managing templates.
Edit Layout
Customize template layout. For more information, see Creating and editing templates.
Message for empty result
Specify message to be displayed for empty result.
A data source to listen
Select a data source to listen to. When search results for the selected data source change, the widget receives the results and refreshes its display.
Send click events for ranking
Specify whether to send a click event every time a document is selected from a document list.
Result Details () Show the details for the selected item when clicking on an item from the result list.
Layout template
Select a layout template. For more information, see Managing templates.
Edit Layout
Customize template layout. For more information, see Creating and editing templates.
Message for no result selected
Specify message to be display when nothing is selected.
A data source to listen
Select a data source to listen to. When a document is selected in the selected data source, the widget receives the selected document and refreshes its display.
Refinement () Restrict the search results on a page to the selected facet or facets.
Facet
Select a facet to restrict the search results.
Applies to version 12.0.2.2 and subsequent versions unless specifically overridden Value Type
Numeric value to be used as value of chart. Displayed only for oneWEX data source.
Applies to version 12.0.2.2 and subsequent versions unless specifically overridden Use Range setting in the target collection
Use Range setting defined in oneWEX collection. You can change the settings in Facet tab of collection edit page in oneWEX admin UI or content miner UI. Displayed only for oneWEX data source.
Multiple
If selected, the user can select multiple facet values and make OR search using the selected facets. If deselected, the user can select only a single facet value.
Maximum number of displayed items
Specify the maximum number of displayed items. If the number of facet values in the target search result is greater than the maximum value, a Show more link is displayed at the bottom of the widget.
Applies to version 12.0.2.2 and subsequent versions unless specifically overridden Use filter for refinement
Refine the search result with filter syntax of query instead of merging into query text.
A data source to listen
Select a data source to listen to for search results which contains facet values for the target facet.
Chart () Display content in a graphical form.
Facet
Select a facet for target of visualization.
Applies to version 12.0.2.2 and subsequent versions unless specifically overridden Value Type
Numeric value to be used as value of chart. Displayed only for oneWEX data source.
Applies to version 12.0.2.2 and subsequent versions unless specifically overridden Use Range setting in the target collection
Use Range setting defined in oneWEX collection. You can change the settings in Facet tab of collection edit page in oneWEX admin UI or content miner UI. Displayed only for oneWEX data source.
Start
Set the start value of range of facet values to be retrieved. Displayed only if the type of selected facet is Long or Date.
End
Set the end value of range of facet values to be retrieved. Displayed only if the type of selected facet is Long or Date.
Gap
Set the interval value to retrieve facets in the specified range. Displayed only if the type of selected facet is Long or Date.
Chart type
Select chart type: Auto, Pie, Bar or Line. If Auto is selected, chart type is selected automatically based on widget width and height, number of facets, and so on.
Maximum number of displayed items
Specify the maximum number of displayed items in the chart.
Orientation
Select orientation of Bar chart and Line chart: Auto, Horizontal, or Vertical.
Height
Specify chart height in pixels.
Applies to version 12.0.2.2 and subsequent versions unless specifically overridden Use filter for refinement
Refine the search result with filter syntax of query instead of merging into query text.
A data source to listen
Select a data source to listen to for search results which contains facet values for the target facet.
Custom () Build a custom widget. For more information, see Creating custom widgets.
Pagination Applies to version 12.0.3 and subsequent versions unless specifically overridden Display the number of pages, the number of search results, and links to specific pages. In the earlier releases, it was integrated into the Result List widget.

Recommendation widgets

The following widgets appear in the Recommendation set of built-in widgets.

Table 3. Recommendation widgets
Widget Description and properties
Clustering () Generate document clusters from the results of the current search.
A data source to listen
Select a data source to listen to.
Query Recommendation () Display recommended query strings based on the current search.
Recommendation type
Select recommendation type
Words or phrases in the index
Suggests frequently indexed words or phrases extracted from the documents indexed in the data source.
Words or phrases correlated to the input
Suggests keywords highly correlated to the document set refined by the input.
Words or phrases used in similar context
Suggest keywords from wordvectors that learn words that appear in similar usage, meaning from the data source. You need to train the wordvectors in the Curation studio.
Spell correction
Corrects mis-spelling by computing difference between the input and indexed terms.
A data source to listen
Select a data source to listen to.
Document Recommendation () Display recommended documents based on the current search.
Recommendation type
Select recommendation type.
Documents with similar content
Recommends documents that contain content similar to that of a selected document.
Documents people also viewed
Recommends documents rated by other users who have a similar collaboration history to the current user. You must complete rating activities before training the document recommendation model. You can start training with the /api/v1/collections/{collectionId}/trainCf API call and can see the result of training with the /api/v1/collections/{collectionId}/trainCf/list API call. After the training succeeds, reload the collection with the /api/v1/collections/{collectionId}/exploration/reload API call.
Layout template
Select a layout template. For more information, see Managing templates.
Edit Layout
Customize template layout. For more information, see Creating and editing templates.
Message for empty result
Specify message to be display for empty result.
A data source to listen
Select a data source to listen to.
A data source to search
Select a data source to find the recommended documents.

Customizable built-in widgets

Some of the built-in widgets are implemented based on the Custom widgets, and they are fully customizable by modifying the code. Such widgets include Result List, Result Details, Sort, Recommend Document, Html, Pagination, Bootstrap Pagination, and Query Recommendation.