Skip to main content

We've Moved!

Product Documentation has moved to docs.hitachivantara.com
Hitachi Vantara Knowledge

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

  1. 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.

  2. 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:
    1. Name: <name of stream output by Text and Metadata Extraction stage>

    2. Type: text_hci

    3. 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.

GUID-807328E3-708B-486B-A37E-BAEE0877F56B-low.png

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.

TipThe built-in Snippet Extraction stage adds a field called HCI_snippet to your documents. This field contains a small portion of the content of a document and is useful field for which to enable highlighting.
NoteSearch result highlighting can greatly increase the size of an index. As a result, you should limit the number of fields for which you enable it.
Enabling search result highlighting

Procedure

  1. 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.

  2. Configure a field in the index collection to support highlighting:

    1. In the Workflow Designer, click the Index Collections window.

    2. Click the Schema tab.

    3. Click the edit icon (GUID-2548EA14-5968-4706-89BC-165684BD24D9-low.png) 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.

    4. Click Select field attributes by use case and select either Keyword Highlighting or Phrase Highlighting.

    5. Click Update Field.

  3. To update the search index with your changes, restart the workflow task. For information, see Starting a task over.

  4. Click Index Collections > index-collection-name > Query Settings > query-settings-name.

  5. On the Fields tab, click Add field and select the field that you configured to support highlighting.

  6. On the Results tab:

    1. Click Add Element and select how you want the field to be displayed. For more information, see Configuring search result layouts.

    2. In the dropdown that appears, select the field you want.

    3. Select the Highlight Keywords option for the field.

    4. 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.

NoteImage, video, and audio files in Amazon S3 must have public read permissions to appear in search results.

Procedure

  1. 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.

  2. For image files, in your processing pipeline:

    1. 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.

    2. Surround the stage with a conditional statement that allows only image files to enter the Mapping stage. See Adding conditional statements to a pipeline.

  3. Repeat step 2 for audio and video files. For these, use the target field names displayVideo and displayAudio

  4. Click Index Collections > index-collection-name.

  5. On the Schema tab:

    1. Click Create Field.

    2. In the Name field, type displayImage.

    3. In the Type field, select string.

    4. Click Create.

  6. Repeat step 5 for displayAudio and displayVideo.

  7. Run the workflow task to add these changes to the index.

  8. Click Index Collections > index-collection-name > Query Settings > query-settings-name.

  9. On the Fields tab, click Add Field to add the fields you added in step 2.

  10. On the Results tab:

    1. Click Add Element and select Image.

    2. In the menu that appears, select displayImage.

    3. Click Add Element and select Audio.

    4. In the menu that appears, select displayAudio.

    5. Click Add Element and select Video.

    6. In the menu that appears, select displayVideo.

    7. 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.

GUID-B25CF42B-0200-41B5-96C9-DC6A76FEBB46-low.png
Requirements

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 of text_suggest.

    The query suggestions that the Search App displays are based on the values indexed for this field.

Default settings

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

  1. Create a workflow and add a data connection, pipeline, and index collection to it. See Creating a workflow.

  2. 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.

  3. 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.

  4. In the index collection schema, add a copy field that uses the author field as the source and HCI_autocomplete as the destination. See Defined, dynamic, and copy fields and Adding and editing fields in an index collection schema.

  5. 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.

GUID-B81390E6-CB13-4065-8F84-742C9EEAE99C-low.png

Facets appear on the lefthand side of the Search App.

Procedure

  1. 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.

  2. In your index collection schema, do either of these for each field that you want to make available as a facet:

  3. In the index collection query settings, add and configure the fields on the Facets tab. For information, see Configuring facets in query settings.

  4. 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

  1. 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.
  2. Configure a field in the index collection to support sorting:

    1. Click the Index Collections window.

    2. Click the Schema tab.

    3. Click the edit icon (GUID-2548EA14-5968-4706-89BC-165684BD24D9-low.png) 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.

    4. Click Select field attributes by use case and select Sort on Field.

    5. Click Update Field.

  3. To update the search index with your changes, restart the workflow task. For information, see Starting a task over.

  4. Click Index Collections > index-collection-name > Query Settings > query-settings-name.

  5. On the Fields tab, click Add field and select the field that you configured to support sorting.

  6. Enable the Sortable option for the field.

  7. 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

Your system administrator needs to grant access to user groups before you can configure per-document security for users in those groups.

Procedure

  1. 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.

  2. Add and enable a set of private query settings for the index collection. For information, see Creating and editing query settings.

  3. Configure document security settings for the query settings. For information, see Configuring access control settings in query settings.

  4. Associate a user group with the query settings for your index collection.

  5. Add the Document Security stage to your pipeline. For information, see Adding stages to a pipeline.

  6. 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.

  7. Configure the Document Security stage to allow or deny access to groups. For information, see Document Security stage.

  8. 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.

GUID-C68AEBF7-C2CC-4A46-8F9E-B3DD28AA5035-low.png
Built-in file type icon locations
  • /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
Using your own file type icons

Procedure

  1. Create a data connection to the data source where those icons reside. For information, see Creating data connections.

  2. Create a pipeline. For information, see Creating and modifying processing pipelines.

  3. 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

  4. Surround the Tagging stage with a conditional statement that allows only the applicable file type to reach the Tagging stage.

  5. Repeat steps 3 and 4 for each file type for which you want to display an icon.

  6. 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.

  7. In the index collection query settings, on the Fields tab, add the fileTypeIcon field. For information, see Configuring fields in query settings.

  8. 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:

    1. Click Add Element and select Thumbnail.

    2. In the Thumbnail field, type fileTypeIcon.

    3. Click Update.

  9. Add the data connection, pipeline, and index collection to a workflow

  10. Run the workflow task. For information, see Running workflow tasks.

  11. Perform a search in the Search App. For information, see the Search App.

Results

File type icons appear next to search results.

 

  • Was this article helpful?