Contextual search properties

  • Release version: Yokohama
  • Updated January 30, 2025
  • 3 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 Yokohama release enable you to control the search behavior within tables and record producer configurations. These settings determine which fields are searchable, how searches are triggered, and how search results are displayed and managed within forms. Adjusting these properties helps optimize user experience and system performance when conducting contextual searches.

    Show full answer Show less

    Key Properties and Their Practical Use

    • Search Result Limits:
      • com.snc.contextualsearch.result.default.limit sets the default maximum number of search results returned (default is 10).
      • com.snc.contextualsearch.result.threshold triggers system log warnings if searches return more than 10,000 results, helping identify potential performance issues.
    • Search Trigger Settings:
      • com.snc.contextualsearch.minlength defines the minimum number of characters a user must type before a search is triggered (default is 3 characters). This applies to both contextual and Agent Assist searches.
      • com.snc.contextualsearch.waittime sets the delay in milliseconds before a search is triggered after typing stops (default is 1,000 ms).
    • Default Search Field:
      • com.snc.contextualsearch.widget.form.defaultfield specifies the default search field created with a table configuration (default is shortdescription).
    • Search Results Widget Behavior in Forms:
      • com.snc.contextualsearch.widget.form.opencollapsednewrecords toggles collapsing the search widget when creating new records (default is false, meaning it stays expanded).
      • com.snc.contextualsearch.widget.form.opencollapsedexistingrecords controls collapsing the widget when opening existing records (default is true, so it collapses by default).
      • com.snc.contextualsearch.widget.form.expandonsearchfieldupdate ensures the widget expands and runs a search automatically when the search field is updated (default is true).
      • com.snc.contextualsearch.widget.form.showmetadata enables displaying additional metadata below each search result to provide richer context (default is true). For Knowledge articles, metadata configuration is managed separately via Knowledge Management properties.
    • Link Handling:
      • com.snc.contextualsearch.cxsnewwindow.forcerelativelink forces links opened from the contextual search modal window to be relative, enhancing security and consistency (default is true). This property is available from Yokohama patch 1 release onward.

    How to Access and Manage These Properties

    You can view and configure contextual search properties by navigating to Contextual Search > Properties in the ServiceNow platform. For detailed system-level access, use sysproperties.list in the navigation filter to find and adjust these settings as needed.

    Benefits for ServiceNow Customers

    • Fine-tune search responsiveness and relevance by adjusting character thresholds and wait times.
    • Control the volume of search results to maintain optimal system performance and usability.
    • Customize the search experience within forms to align with user workflows, saving screen space and improving navigation.
    • Enhance search result context with metadata, aiding users in quickly identifying relevant records.
    • Enforce secure and consistent link behavior from search results to maintain platform integrity.

    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 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 text entered 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 text entered 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’re 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 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 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.
    Always force a relative link in the cxs_new_window UI Page

    [com.snc.contextual_search.cxs_new_window.force_relative_link]

    The property ensures that only relative links open from the contextual search modal window. By default, the property is set to true.

    When the value is set to true, a link opened from the contextual search modal window is forced to be a relative link.

    When the value is set to false, a relative or external link can be opened from the contextual search modal window.

    To review this property in the System Properties [sys_properties] table, enter sys_properties.list in the navigation filter.

    Note:
    This property is available from the Yokohama patch 1 release onwards.