Configuring your user's search experience
This section contains topics on some ways that you can configure the experience for your users that search for data.
Enabling full-content search
Your users expect to be able to search for files based on their contents, not just their metadata.
To enable full-content search for your documents:
Procedure
Use the built-in Text and Metadata Extraction stage in your workflow pipeline. This stage examines a document's contents and extracts keywords that support full-content search. By default, the stage stores those keywords in a stream called HCI_text.
Ensure that your index collection schema is configured to index the stream output by the Text and Metadata Extraction stage.
NoteIndex collections created by the system are configured to index the contents of HCI_text by default.If you change the name of the stream output by the Text and Metadata Extraction stage, add a new field to your index collection schema with these settings:Name: <name of stream output by Text and Metadata Extraction stage>
Type: text_hci
Field attributes:
- indexed
- multiValued
Search result highlighting
When search result highlighting is enabled, a user's search term is shown in bold text in the list of search results.

To enable search result highlighting, you need to configure one or more fields in the index collection schema to support it. Then, you need to configure the index collection query settings to display highlighted text in search results.
Procedure
If you don't already have a workflow, set one up and add data connections, processing pipelines, and index collections to it. For information, see Quick Start: Indexing and searching.
Configure a field in the index collection to support highlighting:
In the Workflow Designer, click the Index Collections window.
Click the Schema tab.
Click the edit icon (
) for the field you want. If the field is not already part of the index collection, add it. For information, see Adding and editing fields in an index collection schema.
Click Select field attributes by use case and select either Keyword Highlighting or Phrase Highlighting.
Click Update Field.
To update the search index with your changes, restart the workflow task. For information, see Starting a task over.
Click Index Collections > index-collection-name > Query Settings > query-settings-name.
On the Fields tab, click Add field and select the field that you configured to support highlighting.
On the Results tab:
Click Add Element and select how you want the field to be displayed. For more information, see Configuring search result layouts.
In the dropdown that appears, select the field you want.
Select the Highlight Keywords option for the field.
Click Update.
Making images, audio, and video appear in search results
You can configure images, audio, and video files to appear inline in your user's search results. That way, your users can view or listen to files right from the list of search results without having to download the files.
The example procedure explains how to do this for audio, video, and images. If your data sources don't include all three of these kinds of files, you can omit steps as necessary.
Procedure
In the Workflow Designer, if you don't already have a workflow, create one and add data connections, processing pipelines, and index collections to it. For information, see Quick Start: Indexing and searching.
For image files, in your processing pipeline:
Add a Mapping stage and configure it with these settings:
- Copy Field or Stream: Field to Field
- Existing name: HCI_URI
- Target's name: displayImage
For information on this stage, see Mapping stage.
Surround the stage with a conditional statement that allows only image files to enter the Mapping stage. See Adding conditional statements to a pipeline.
Repeat step 2 for audio and video files. For these, use the target field names
displayVideo
anddisplayAudio
Click Index Collections > index-collection-name.
On the Schema tab:
Click Create Field.
In the Name field, type
displayImage
.In the Type field, select string.
Click Create.
Repeat step 5 for
displayAudio
anddisplayVideo
.Run the workflow task to add these changes to the index.
Click Index Collections > index-collection-name > Query Settings > query-settings-name.
On the Fields tab, click Add Field to add the fields you added in step 2.
On the Results tab:
Click Add Element and select Image.
In the menu that appears, select
displayImage
.Click Add Element and select Audio.
In the menu that appears, select
displayAudio
.Click Add Element and select Video.
In the menu that appears, select
displayVideo
.Click Update
Query suggestions
With the query Autocomplete setting enabled for an index, the Search App makes query term suggestions to users.
For example, this image shows the query terms that the Search App suggested when a user entered the term power while searching the index named CorpSearchIndex.

Query suggestions appear only when a user searches a single index.
For a search index to make suggestions:
- The Autocomplete option must be enabled in the index collection query settings.
- The index collection schema must contain a field named
HCI_autocomplete
with a type oftext_suggest
.The query suggestions that the Search App displays are based on the values indexed for this field.
By default, each index makes query suggestions to users.
Each index collections copies the contents of the HCI_snippet
and HCI_displayName
fields to the
HCI_autocomplete
field. This means that when a user enters a query term, the Search App compares that term to
indexed filenames and document content snippets to look for related term to suggest.
Configuring what query suggestions are based on
To change what query settings are based on, you change the copy fields for the index collection schema. For example, to have the Search App base query suggestions on the names of document authors:
Procedure
Create a workflow and add a data connection, pipeline, and index collection to it. See Creating a workflow.
In the pipeline, add a Text and Metadata Extraction stage. This typically extracts the names of document authors. See Text and Metadata Extraction stage and Adding stages to a pipeline.
If the Text and Metadata Extraction stage produces differently named fields that each contain the names of document authors, add a Mapping stage to the pipeline and configure it to rename all applicable fields to
author
. See Mapping stage.In the index collection schema, add a copy field that uses the
author
field as the source andHCI_autocomplete
as the destination. See Defined, dynamic, and copy fields and Adding and editing fields in an index collection schema.Run the workflow task to index documents.
Adding facets to the Search App
Facets are categories that users can use to narrow down a set of search results.

Facets appear on the lefthand side of the Search App.
Procedure
In the Workflow Designer, if you don't already have a workflow, set one up and add data connections, processing pipelines, and index collections to it. For information, see Quick Start: Indexing and searching.
In your index collection schema, do either of these for each field that you want to make available as a facet:
- Enable the
docValues
orindexed
field attributes. - Enable the
Search within a field
orFacet on Field
use cases.For information on configuring fields, see Adding and editing fields in an index collection schema.
- Enable the
In the index collection query settings, add and configure the fields on the Facets tab. For information, see Configuring facets in query settings.
Run the workflow task. For information, see Running workflow tasks.
Search result sorting
This topic explains how to enable search result sorting. When enabled, users can sort search results based on the fields that you specify.
Broadly, to enable sorting, you need to configure one or more fields in the index collection schema to support it. Then, you need to configure the index collection query settings to enable sorting for the field.
Procedure
In the Workflow Designer, if you don't already have a workflow, set one up and add data connections, processing pipelines, and index collections to it. For information, see Quick Start: Indexing and searching.
NoteWhen configuring your processing pipeline, ensure that it adds the fields that you want to make sortable. For example, to allow search results to be sorted based on a document's creation date, you can add the Text and Metadata Extraction stage to your pipeline. This stage adds a field called Creation-Date to each document.Configure a field in the index collection to support sorting:
Click the Index Collections window.
Click the Schema tab.
Click the edit icon (
) for the field you want. If the field is not already part of the index collection, add it. For information, see Adding and editing fields in an index collection schema.
Click Select field attributes by use case and select Sort on Field.
Click Update Field.
To update the search index with your changes, restart the workflow task. For information, see Starting a task over.
Click Index Collections > index-collection-name > Query Settings > query-settings-name.
On the Fields tab, click Add field and select the field that you configured to support sorting.
Enable the Sortable option for the field.
Click Update.
Configuring per document security
You can use the Document Security stage to apply access control list (ACL) fields to
documents. This lets you enforce security for individual documents. For example, if
you deny access to sample.txt
for a particular user group,
sample.txt
is never returned to those users in their search
results.
You use index collection query settings to specify which document ACLs should be honored.
Before you begin
Procedure
In the Workflow Designer, if you don't already have a workflow, set one up and add data connections, processing pipelines, and index collections to it. For one way of doing this, see Quick Start — Indexing and searching.
Add and enable a set of private query settings for the index collection. For information, see Creating and editing query settings.
Configure document security settings for the query settings. For information, see Configuring access control settings in query settings.
Associate a user group with the query settings for your index collection.
Add the Document Security stage to your pipeline. For information, see Adding stages to a pipeline.
Surround the Document Security stage with a conditional to filter the documents you want into the Document Security stage. For information, see Adding conditional statements to a pipeline.
Configure the Document Security stage to allow or deny access to groups. For information, see Document Security stage.
Run the workflow task. For information, see Running workflow tasks.
Adding file type icons to search results
Hitachi Content Search includes a built-in file type icons that you can display on your search results in the Search App. You can also use your own file type icons.

- /ui/static/images/file-ae.svg
- /ui/static/images/file-ai.svg
- /ui/static/images/file-aif.svg
- /ui/static/images/file-asp.svg
- /ui/static/images/file-avi.svg
- /ui/static/images/file-bmp.svg
- /ui/static/images/file-css.svg
- /ui/static/images/file-doc.svg
- /ui/static/images/file-dot.svg
- /ui/static/images/file-eps.svg
- /ui/static/images/file-fla.svg
- /ui/static/images/file-fw.svg
- /ui/static/images/file-gif.svg
- /ui/static/images/file-htm.svg
- /ui/static/images/file-jpg.svg
- /ui/static/images/file-js.svg
- /ui/static/images/file-jsp.svg
- /ui/static/images/file-mov.svg
- /ui/static/images/file-mp3.svg
- /ui/static/images/file-mpg.svg
- /ui/static/images/file-odt.svg
- /ui/static/images/file-other.svg
- /ui/static/images/file-pdf.svg
- /ui/static/images/file-php.svg
- /ui/static/images/file-pic.svg
- /ui/static/images/file-png.svg
- /ui/static/images/file-ppt.svg
- /ui/static/images/file-pr.svg
- /ui/static/images/file-psd.svg
- /ui/static/images/file-rtf.svg
- /ui/static/images/file-tga.svg
- /ui/static/images/file-tif.svg
- /ui/static/images/file-txt.svg
- /ui/static/images/file-vid.svg
- /ui/static/images/file-vsd.svg
- /ui/static/images/file-wav.svg
- /ui/static/images/file-xls.svg
- /ui/static/images/file-xml.svg
- /ui/static/images/file-xps.svg
Procedure
Create a data connection to the data source where those icons reside. For information, see Creating data connections.
Create a pipeline. For information, see Creating and modifying processing pipelines.
Add a Tagging stage to the pipeline and configure it to add this field/value pair:
- Field name: fileTypeIcon
- Field value: The path to an icon file in the data source.
For example,
/ui/static/images/file-png.svg
Surround the Tagging stage with a conditional statement that allows only the applicable file type to reach the Tagging stage.
Repeat steps 3 and 4 for each file type for which you want to display an icon.
In your index collection schema, create a new field named fileTypeIcon with a type of string. For information, see Adding and editing fields in an index collection schema.
In the index collection query settings, on the Fields tab, add the fileTypeIcon field. For information, see Configuring fields in query settings.
In the index collection query settings, configure the fileTypeIcon field to show up in search results. To do this, on the query settings Results tab:
Click Add Element and select Thumbnail.
In the Thumbnail field, type fileTypeIcon.
Click Update.
Add the data connection, pipeline, and index collection to a workflow
Run the workflow task. For information, see Running workflow tasks.
Perform a search in the Search App. For information, see the Search App.
Results