Search Scripted Post-processors form
Summarize
Summary of Search Scripted Post-processors form
The Search Scripted Post-processors form in ServiceNow enables administrators to create and manage scripted post-processors within AI Search application configurations. These post-processors are server-side scripts that modify search results dynamically after the initial query, allowing customization of how results are displayed or processed.
Show less
Key Features
- Activation Control: You can activate or deactivate each scripted post-processor as needed.
- Application Scope: The form automatically sets the application scope for the post-processor to maintain proper configuration context.
- Type Selection: Specify whether the script operates on Genius Result answer records or standard search result records, enabling tailored processing depending on the search data type.
- Post-processing Script Function: Write server-side JavaScript functions that take a record as input and modify its fields. For example, transforming date fields into human-friendly relative time formats (e.g., "2 hours ago") to enhance search result readability.
- API Support: The UI provides an overview of available API methods for use within the script, facilitating script development and ensuring consistency.
- Reference to Existing Scripts: Existing post-processor scripts can be accessed and used as templates by navigating to the Search Scripted Post-processors [syssearchscriptedprocessor] table in list view, helping customers quickly start or adapt their own scripts.
Practical Use and Benefits
This capability allows ServiceNow customers to enhance AI Search results by applying custom logic after the initial search query execution. For instance, converting system dates into a more user-friendly format improves the end-user experience without altering the underlying data. By leveraging scripted post-processors, customers gain greater control over how search data is presented, ensuring results are more relevant, readable, and aligned with business needs.
The Search Scripted Post-processors form enables you to create a search scripted post-processor in the search application configuration for an AI Search application.
For details on creating or editing search scripted post-processors, see Using search scripted post-processors in AI Search application configurations.
| Field | Description |
|---|---|
| Active | Option to activate the search script post-processor. |
| Name | Name for the search script post-processor. |
| Application | Application scope for the search script post-processor. This field is automatically set. |
| Type | Type of record the search script post-processor operates on.
Valid values:
|
| Post processing script | Server-side script function that takes a record object as its parameter. When the search scripted post-processor is linked to a search application configuration, search results reflect changes made to
the record object in this script function.
As an example, this post-processing script function operates on search results from the kb_knowledge table, transforming sys_updated_on date field values into a human-readable
format:
Note: The UI displays an overview of API methods usable in the post-processing script function. You can copy code from an existing post-processor script to use as a starting point for your own script function. To access existing post-processor scripts, open the Search Scripted Post-processors
[sys_search_scripted_processor] table in list view by following these steps:
|