Contextual search properties

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Contextual Search Properties

    Contextual search properties in ServiceNow enable you to customize search functionalities, including which fields to search and how many results to display per page. These properties can be configured underContextual Search > Properties.

    Show full answer Show less

    Key Features

    • Maximum Results Limit: Controls the default maximum number of search results returned, set to 10 by default.
    • Minimum Character Trigger: Specifies the minimum number of characters (default: 3) required to initiate a search.
    • Search Wait Time: Sets the delay (default: 1,000 ms) before triggering a search as text is typed.
    • Result Threshold Warning: Logs a warning if search results exceed 10,000, helping with performance monitoring.
    • Default Search Field: Automatically assigns a field (default: shortdescription) for searches when creating new configurations.
    • Widget Behavior: Allows customization of the search results widget display, such as collapsing it when creating new records or auto-expanding it when the search field is updated.
    • Metadata Display: Configures whether to show additional metadata for each search result, which can enhance the information available to users.

    Key Outcomes

    By effectively utilizing these contextual search properties, ServiceNow customers can enhance search efficiency and user experience by controlling how results are displayed and ensuring relevant information is surfaced quickly. This customization supports improved performance and can help in troubleshooting potential issues related to search load and response time.

    Contextual search properties are used to control the fields that you can search from and the number of results displayed per page.

    The contextual search properties are available at Contextual Search > Properties.

    Table 1. Properties for contextual search
    Property label Description
    Default value for maximum number of search results returned for table and record producer configurations

    [com.snc.contextual_search.result.default.limit]

    Default value for the maximum number of search results returned when you create a new table or record producer configuration. By default, the value is 10.
    Number of characters that a configured field needs before triggering a search

    [com.snc.contextual_search.min_length]

    Number of characters that contextual search requires before triggering a search based on the typed text in the search field. By default, the value is set to 3 characters.

    This property also applies to the Agent Assist search.

    Number of milliseconds that a configured field will wait before triggering a search

    [com.snc.contextual_search.wait_time]

    Number of milliseconds that contextual search waits before triggering a search based on the typed text in the search field. By default, the value is set to 1,000 milliseconds (one second).
    Records returned above this threshold will log warnings

    [com.snc.contextual_search.result.threshold]

    Triggers a warning message within the system log whenever more than this number of results are returned in a search. This logging helps if you are experiencing performance issues because of large searches. By default, the value is set to 10,000 results.
    When a Form configuration is created a search field with a name matching this property will be automatically created

    [com.snc.contextual_search.widget.form.default_field]

    The default field that is used for searching when you create a new table configuration. By default, the value is set to short_description.
    Collapse the search results widget when creating a new record in a form

    [com.snc.contextual_search.widget.form.open_collapsed_new_records]

    When the value is set to true and you create a new record, the search results widget is collapsed to save space. By default, the value is set to false.
    Collapse the search results widget when opening an existing record in a form

    [com.snc.contextual_search.widget.form.open_collapsed_existing_records]

    When the value is set to true and you open an existing record, the search results widget is collapsed to save space. By default, the value is set to true.
    Note:
    The property applies only to existing records and not to new records.
    Auto expand the search results widget when search field updates in a form

    [com.snc.contextual_search.widget.form.expand_on_search_field_update]

    When the value is set to true and you update the search field in a form, the search results widget automatically expands and runs the search. By default, the value is set to true.
    Show meta data on form contextual search results

    [com.snc.contextual_search.widget.form.show_meta_data]

    When the value is set to true, each search result includes additional metadata below each result record. By default, the property is set to true.
    • For Knowledge articles, you configure the metadata fields to display by modifying Knowledge search properties. As an example, you can display the article's author, article number, and knowledge base name. For details on Knowledge search properties, see Knowledge Management properties.
    • Configure the search result display fields for other resources by editing search result display configurations. For details on search result display configuration settings, see Edit search resource display field record.