Skip to main content

We've Moved!

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

Query settings

Each index collection contains one or more sets of query settings. These query settings determine the overall search experience for your users when they search an index. For example, you can use query settings to specify which fields users can use to sort search results or how search results are presented.

An index collection can include multiple sets of query settings. Because of this, you can create separate search experiences for two different sets of users, without having to create, maintain, and store two separate indexes. For more information on associating a group of users with a particular set of query settings, see Controlling user access to search indexes.

TipUnlike changes to an index collection schema, changes to query settings take effect immediately and do not need you to reindex your content. So if you need to make changes to your users' search experience after you've finalized your index collection schema, try making those changes through query settings before you reconfigure your schema.

Creating and editing query settings

You can create any number of query settings in an index collection.

After you create a set of query settings, you need to configure its settings.

To create and edit query settings:

Procedure

  1. Click the Index Collections window.

  2. Click the index collection you want.

  3. Click the Query Settings tab.

  4. Click Create Query Settings.

  5. Enter a name and, optionally, a description for the query settings. Then click Create.

Configuring advanced search options

The Admin App allows you to configure settings for advanced search mode in the Search App. The following settings are available.

  • Additional Query Parameters: Allows users to add additional parameters in searches.

The available query parameters are specific to the type of index being searched:

  • For Elasticsearch indexes, the only supported parameter is debugQuery=true.
  • Field Selection: Allows users to choose which fields are returned in search results.
GUID-FE6AD960-CC23-4591-8A7F-11D09083E29B-low.png

To configure these options:

Procedure

  1. Click the Index Collections window.

  2. Select the index collection you want.

  3. Click the Query Settings tab.

  4. Select the query setting you want.

  5. Click the Overview option.

  6. Scroll down to the Advanced Search Options section.

  7. Enable/disable Additional Query Parameters or Field Selection by clicking the Yes/No toggle.

  8. Click Update to save your changes.

Query setting configuration options

The following topics describe what you can configure in a set of query settings.

Configuring index display name

In a set of query settings for an index collection, you can specify a display name for the index. This display name is presented to your search users in the Search App.

You can use this setting to present a single index differently to two different sets of users. For example, say you have an index containing patients' medical and billing information. This index has two sets of query settings, one that allows doctors to view medial information and one that allows healthcare administrators to view billing information. You can specify two separate display names so that this single index appears to doctors as Patient Medical and to administrators as Patient Billing.

To configure an index display name:

Procedure

  1. Click the Index Collections window.

  2. Select the index collection you want.

  3. Click the Query Settings tab.

  4. Click the set of query settings that you want.

  5. On the Overview tab, type a name in the Index Display Name field.

  6. Click Update.

Enabling and disabling query suggestions

The Autocomplete setting determines whether the Search App makes query term suggestions to users. For more information, see Query suggestions.

Enabling search result download

When you enable the Download Search Results option for an index collection, your users can download lists of their search results. These lists are downloaded as .csv (comma-separated value) files. The files contain only search result metadata, not the full contents of each search result.

When the option is enabled, the download search results icon appears in the Search App.

GUID-F4B4206C-A339-4DB6-B36A-75DEE13DAD88-low.png

To enable search result downloads:

Procedure

  1. Click the Index Collections window.

  2. Select the index collection you want.

  3. Click the Query Settings tab.

  4. Click the set of query settings that you want.

  5. On the Overview tab, enable the Download Search Results option.

  6. Click Update.

Configuring fields in query settings

In a set of query settings for an index collection, you configure these settings for a field:

  • Whether the field is visible: Users who have permission to search the index can use only visible fields in their searches. The index collection specifies what behaviors each visible field supports.
  • Display Name: An optional name for the field. Use this to present a more user-friendly name for the field in the Search App.

You cannot configure fields for an external HDDS index collection. For more information on that type of index collection, see Index collection types and settings.

NoteWhen you register an existing external Apache Solr index with your system, the existing fields from that index are not automatically made visible to your users. To make them visible:
  1. In the query settings for the index collection, on the Fields tab, click Actions > Remove All Fields to remove the default fields.
  2. Click Actions > Add All Fields to add all fields from the index schema.

For information on external indexes, see Adding index collections.

To configure the fields:

Procedure

  1. Click the Index Collections window.

  2. Select the index collection you want.

  3. Click the Query Settings tab.

  4. Click the set of query settings that you want.

  5. On the Fields tab:

    • To make a field visible, click Add field to add it to the list.
    • In the Display Name column, optionally enter a more user-friendly name for the field.
    Note
    • To add all fields from the index collection schema to the Fields tab, click Actions > Add All Fields.
    • To remove all fields from the Fields tab, click Actions > Remove All Fields.
  6. Click Update.

Configuring facets in query settings

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.

In a set of query settings for an index collection, you can configure these facet settings:

  • Whether the field can be used as a facet. All indexed fields are eligible to be facets.
  • Limit Minimum: The minimum number of unique facet values required for a facet to be presented in the Search App.

    Take for example a field called author, which is configured to support faceting. In a set of search results, three unique values for author appear. If you configure a limit minimum value of 3 or less, the author facet is displayed in the search results. If you specify a limit minimum of 4 or more, the author facet is not displayed.

  • Limit Maximum: The maximum number of unique facet values to display.

    Continuing with the example field author, if you configure a limit maximum value of 2 or more, only the two authors that occur most often in the search results are displayed as facets.

For more information, see Adding facets to the Search App.

To configure a face in a query setting:

Procedure

  1. Click the Index Collections window.

  2. Select the index collection you want.

  3. Click the Query Settings tab.

  4. Click the set of query settings that you want.

  5. Click the Facets tab.

  6. If the field you want isn't listed, click Add field to add it.

  7. Enable the Facetable option for the fields you want.

  8. Configure other facet settings for the fields you want.

  9. Click Update.

Visualizations

The Admin App gives you the option to enable visualization for Index Collections. Visualization allows you to view facet information as a chart in the Search App.

When facet visualization is enabled for an index collection, the facet windows in the Search App display chart icons.

GUID-A5D8E271-8E48-4B2B-8A00-9CA78104006A-low.png

Users can click this icon to view facet information in a table, bar chart, or pie chart.

GUID-42B94F48-7524-49CA-9B39-4798F93924C4-low.png

Users can still view facet information as a list even when visualization is enabled.

To view visualizations:

Procedure

  1. Click the Index Collections window.

  2. Select the index collection you want.

  3. Click the Query Settings tab.

  4. Select the query settings you want.

  5. Scroll down to the Enable Visualizations option and enable/disable it by clicking the Yes/No box.

  6. Click Update to save your changes.

Related REST API methods - PUT indexes

PUT /indexes/{uuid}

Configuring filtering in query settings

After a user performs a search in the Search App, a Refine button appears. This button allows the user to select additional fields by which to narrow down their search results.

As a search administrator, you can configure which fields are available to the user under the Refine button. You configure this in the query settings for an index collection.

To be displayed under the Refine button, a field must be configured to be indexed in the index collection schema and must appear on the list of visible fields in the query settings. For more information, see Adding and editing fields in an index collection schema and Configuring fields in query settings.

You also have the option of creating your own filter queries in the Filters tab under Query Settings. All custom queries get applied to all queries submitted by Search App users by default.

For example, to filter out documents that are in an index but marked as deleted with the HCI_deleted field, you can add a filter query called -HCI_deleted:true to ensure any deleted documents are not shown in results.

TipTo improve your user's search experience, you should enable filtering for as many fields as possible. This is the only way that your end users can find out which fields are configured to be indexed and, consequently, are available to them for making advanced queries.

To configure filtering:

Procedure

  1. Click the Index Collections window.

  2. Select the index collection you want.

  3. Click the Query Settings tab.

  4. Click the set of query settings that you want.

  5. Click the Refine tab.

  6. For each field, enable one or both of these:

    • Refineable: Specifies whether the field appears as an option under the Refine menu in the Search App.
    • Default: Specifies whether the field is automatically selected for the user when he or she clicks Refine to select fields to filter on.
  7. Click Update.

Configuring sortable fields in query settings

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.

    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.

Boosting field relevancy

In a set of query settings, you can specify boost factors for field/value pairs. Documents that contain field/value pairs with higher boost factors appear higher in search results.

Boosting the relevancy of a field/value pair does not affect which search results are returned. It only affects the order of those results.

Example

For example, say that your dataset contains both PDFs and Microsoft Word documents with similar contents, but the PDFs are more relevant to your users. In your query settings, you can apply these relevancy boosting settings:

FieldValueBoost Value
Content-Typeapplication/pdf5
Content-Typeapplication/msword0.5
With these settings, PDFs will always appear higher than the Word documents in search results. Default setting

The default boost value is 1.

TipWhen configuring relevancy, don't specify a boost value of 1. This is the default for all field/value pairs, even those for which you don't explicitly configure relevancy, so manually specifying 1 does nothing.
Lowering relevancy

To lower the relevancy of a field/value pair, specify a boost value less than 1 (for example, 0.5).

Requirements

You can configure field relevancy only for fields that are configured to support it. For example, if you configure your index collection in basic mode, only fields with the Allow field boosts use case enabled.

For information on configuring index fields, see Adding and editing fields in an index collection schema.

To boost field relevancy:

Procedure

  1. Click the Index Collections window.

  2. Select the index collection you want.

  3. Click the Query Settings tab.

  4. Click the edit icon (GUID-2548EA14-5968-4706-89BC-165684BD24D9-low.png) for the query settings you want to configure.

  5. On the Relevancy tab, search for a field and then click Add.

    The field is added to the list.

  6. Specify these for the field:

    • A token. This is the value on which to adjust relevancy for the field.
    • A boost value. Valid values are positive and negative numbers. A positive boost level means that files that include this field/value pair will appear higher than they normally will in a list of search results.

Configuring search result layouts

Within a set of query settings for an index collection, you can configure how search results appear to users when they search the index. You do this by specifying which field values you want to display for each search result and how those field values should be displayed.

For a field value to be displayed in search results, you need to add it to the list of fields visible to the user. For information, see Configuring fields in query settings. .

To configure search result layouts:

Procedure

  1. Click the Index Collections window.

  2. Click the index collection you want.

  3. Click the Query Settings tab.

  4. Click the Results tab.

  5. In the Title box, specify the field that you want to appear as the title for each search result.

    NoteAt any time, you can click the Preview tab to see what a search result looks like with your settings.
  6. In the Title Link box, specify the field that contains the URL for the document in the data source.

    If you specify a Title Link value, users can download a document's contents by clicking on the search result title.

    NoteAfter running a search in the Search App, users can click search result links to download files from your data sources. For users to be able to access files from Amazon S3, the files must have public read permissions.

    To disable this so that users do not have the option of clicking on a link, click the X icon to delete the Title Link box.

  7. To add another field to be displayed:

    1. Click Add Element.

    2. Select one of these display types:

      • Preview: The value for the field is displayed beneath the Title text.
      • Thumbnail: The value for the field are displayed as a thumbnail image next to each search result.
      • Field Value: The value for the field is displayed in a search result.
      • Labeled Field: Both the field name and its value are displayed in a search result.
      • Image: The value of the field is displayed as a large image within each search result.
      • Audio: For fields that contain audio data, the audio can be played directly from the search results page.
      • Video: For fields that contain video data, the video can be played directly from the search results page.
        NoteTo display images, audio, or video in search results, you also need to configure applicable fields in the index collectionschema. For complete information, see Making images, audio, and video appear in search results.
      • HTML: For fields that contain HTML values, the HTML is rendered by the browser within each search result.
      • Document Metadata: Adds an expandable section to each search result. This section contains all visible metadata fields and their values for the search result.
        TipYou can rename this element to whatever you want.
    3. In the box that appears, specify the name of the field whose contents you want to display.

  8. Click the Show Options link for the field.

  9. Optionally, one or more of these:

    1. Enable Highlighting: Within the returned value, the term that the user searched for is highlighted in bold text.

    2. Hide Non-Highlighted: If the user's search term does not appear within the returned value, the value is not displayed at all in the search results.

    3. Highlight Full Text: If enabled, the full contents of the field are returned and matching terms are highlighted within it. If disabled, a subsection of the field's contents are returned. This subsection includes only the content immediately surrounding highlighted text.

    4. Expandable: If enabled, a subsection of the field's contents are returned in search results. Users can click the More link to view the full contents.

      NoteYou also need to configure the field in the index collection schema to support highlighting. For complete information on setting up highlighting, see Search result highlighting.
  10. Click Update.

Configuring access control settings in query settings

In a set of query settings, you can configure whether your system honors any access control list (ACL) fields added to your documents by the Document Security stage in a pipeline. An ACL contains a list of users or groups and specifies whether those users or groups are allowed or denied from accessing the associated document.

By default, ACL enforcement disabled for a set of query settings. That is, when searching the associate search index, all users can view all files in search results.

Note
  • Your system honors only the ACLs added by the built-in Document Security stage. It does not honor ACLs added by any other source, such as HCP.
  • The local admin user account can always view all documents in search results, regardless of the ACLs on documents or whether ACLs are honored in query settings.
Access control settings

You can configure these ACL settings in a set of query settings:

  • Enforce Document Security: When enabled, ACLs are honored. You need to enable one or more of the following options to specify which ACLs to honor.
  • Enforce Public Setting: When enabled, documents that have the HCI_isPublic:true field/value pair are visible to all users. Files without this field are hidden from all users, except for those granted permission to the file through an Allow ACL.
  • Enforce Allow ACLs: When this is enabled, users can see only the files for which they are explicitly allowed permission by an ACL.
  • Enforce Deny ACLs: When this is enabled, users cannot see files for which an ACL denies them access.
Documents with multiple ACLs

ACLs are honored in this order:

  1. Public
  2. Deny
  3. Allow
Example

Say that a document called MarketingReport.pdf has been configured by a Document Security stage with these ACL settings:

  • HCI_allowACL for the Marketing group.
  • HCI_denyACL for the Engineering group.
  • The document is not publicly accessible.

If a set of query settings is configured to honor all three ACL settings:

  • A user in the Marketing group can view the document.
  • A user in the Engineering group cannot view the document.
  • A user in the Sales group cannot view the document.

To configure access control settings:

Procedure

  1. Click the Index Collections window.

  2. Select the index collection you want.

  3. Click the Query Settings tab.

  4. To specify that ACLs should be honored, enable the Enforce Document Security option.

  5. Enable or disable the other options as you want.

Configuring custom parameters in query settings

You can specify custom parameters for your query settings. By default, any parameter you create gets applied to all users part of the specified query settings.

Custom query parameters only work for Solr indexes.

To configure custom parameters:

Procedure

  1. Click the Index Collections window.

  2. Select the index collection you want.

  3. Click the Query Settings tab.

  4. Click Custom Parameters.

  5. Click Add Item.

  6. Configure your custom parameter name and value and then click Update.

Filtering queries by user

When configuring filter queries in Worlflow Designer, user variables can be used to return documents specific to the currently logged-in user. When the queries are executed, the user variables are automatically injected.

To create a query filter by user:

Procedure

  1. Click the Index Collections window.

  2. Click the index you want to filter.

  3. Click the Query Settings tab.

  4. In the Name column, select the query.

  5. Click the Filters tab.

  6. Under the Filter Query section, click Add Item.

  7. Click the edit button to open the query filter.

  8. In the query filter field, enter one or all of the following:

    • $USERID:
      • For LDAP, this value represents the security ID.
      • For local accounts, this value represents the username.
    • $USERSHORTNAME: A user's short name or username (for example, "jdoe")
    • $USERLONGNAME: A user's long name (for example, "jdoe@example.com")
    • $USERDISPLAYNAME: A user's display name (for example, "John Doe")
    ImportantTo prevent errors with spaces and special characters, user variables must be contained within quotation marks. For example, HCI_displayFullName:"$USERDISPLAYNAME".
  9. Click Update.

    The Search App returns search results for documents specific to the current user.

Enabling and disabling query settings

You can enable one or more sets of query settings at a time for an index collection. While a set of query settings is enabled, the users associated with that set can search the index. While the Public query settings are enabled, all users can search the index. To prevent users from searching the index, disable one or more sets of query settings.

For information on associating users with query settings, see Controlling user access to search indexes.

NoteA user might belong to more than one group, and thereby be associated with more than one set of private query settings. In this case, if multiple query settings are enabled, the user gets the search experience from only one of those query settings, the one that was created first.

Procedure

  1. Click the Index Collections window.

  2. Select the index collection you want.

  3. Click the Query Settings tab.

  4. Select Yes for the query settings you want to enable.

Deleting query settings

When you delete any set of query settings besides Public:

  • And the Public query settings are enabled, all users can still access and search the index.
  • And the Public query settings are disabled, all users associated with the deleted query settings lose search access to the index.

You cannot delete the Public query settings for an index collection.

For information on granting user access to indexes, see Controlling user access to search indexes.

To delete a query setting:

Procedure

  1. Click the Index Collections window.

  2. Select the index collection you want.

  3. Click the Query Settings tab.

  4. Click the delete icon for the query settings you want to remove.

 

  • Was this article helpful?