AI Search Index Source & Search Source Configuration for Task table

Brent Sutton
Mega Sage

I'm hoping this is a simple one to answer.

 

I'm trying to create an AI search indexed source and search source that will allow users to search for their active tasks via Employee Center portal.

 

Steps taken:

  1. Index Source - I've created an AI Search Index Source for the task table and restricted indexing to active "Change Request" and "Requested Item" task types (will be adding more later).
  2. Child Tables - Added the extended CHG [change_request] & RITM [sc_req_item] tables as child tables for the index source.
  3. Indexed all the tables.
  4. BrentSutton_3-1678226399439.png
  5. Search Source - Created a Search Source mapping with a condition to restrict users search results to ones they raised. The RITM "requested_for" and CHG "requested_by" fields are on the child tables linked to the indexed source. Encoded query below:

 

 

 

 

 

active=true^sys_class_name=sc_req_item^ref_sc_req_item.requested_forDYNAMIC90d1921e5f510100a9ad2572f2b477fe^ORopened_byDYNAMIC90d1921e5f510100a9ad2572f2b477fe^NQactive=true^sys_class_name=change_request^ref_change_request.requested_byDYNAMIC90d1921e5f510100a9ad2572f2b477fe^ORopened_byDYNAMIC90d1921e5f510100a9ad2572f2b477fe​

 

 

 

 

 

  1. Upon save of the search source I get an error "Search Source condition could not be saved. See logs for details." and "Invalid Insert" (see screenshot).
  2. BrentSutton_1-1678226213412.png
  3. When I look at the logs, I see an error message "dot-walk column doesn't exist task.ref_sc_req_item.requested_for" for RITM and "dot-walk column doesn't exist task.ref_change_request.requested_by" for CHG.
  4. BrentSutton_2-1678226293394.png
  5. I believe that a field setting may need to be created on the Indexed Source. However, there doesn't appear to be the option to use the dot-walk attribute for the task table or the ability to select child tables for the field selection.
  6. BrentSutton_0-1678226106541.png

     

I've looked at numereous support articles and ServiceNow docs trying to resolve this issue. I'm sure I'm not the first person to attempt indexing the Task table while restricting results using fields on child tables. Any guidance on how to achieve this, or suggestions for an alternative approach with a similar outcome, would be much appreciated.

11 REPLIES 11

Brent Sutton
Mega Sage

@Brian Bakker @Loic1 I'm wondering if you have come across the issue I'm describing in the above question?

 

The AI Search FAQ says that we can index the task table with a retention policy (I have this working). The issue arises in the search source when I try to restrict the results by fields on the child tables. I'm sure there is something simple I am missing in my config?

 

I'm trying to avoid creating individual index and search sources for about five tables extended from task that have fields on the child table that I need for filtering. I have managed to bundle up the HR Case records as the filtering fields were available on the HR Case [sn_hr_core_case] table which I used as my index source and added child tables.

 

If you have any suggestions on how to resolve this or ideas around an alternative approach it would be much appreciated. 

 

Thanks in advance, Brent

Shamus Mulhall
ServiceNow Employee
ServiceNow Employee

Hi @Brent Sutton one option here would be to create a Result Improvement Rule (RIR) that boosts the tasks that are assigned to the session user.  The configuration of the RIR boost action would be similar to the screenshot below.  A boost action would be needed to dynamically match the assigned_to on the Task with the name of the current search user. 

 

An additional note on the Boost Weight configuration, depending on your platform version the scale might be different from the example below. With the Utah release a value of 1000 will double the relevancy score. 

 

Screen Shot 2023-03-09 at 9.55.28 AM.png

 

Hey @Shamus Mulhall , thanks for taking time to reply.

 

My understanding is that the Result Improvement Rule is just going to promote the most relevant result but the full set of indexed results from the source would still be available to search. I'm trying to restrict the user search to only display results where they are recorded in the opened by (Task) field or requested_for (RITM) or "requested_by" (CHG) fields are on the task table index child tables. The RITM & CHG child tables were my first test cases but there are many more child tables (extended from task) that need to be indexed and some may contain sensitive information that we don't want to be available in search.

I thought about using exclusion rules but I think I'll have the same issue.

Hi Brent, 

 

We don't currently support dynamic filters that reference users on Search Sources. If this feature is important to you, please be sure to add it to the idea portal!