AI Search - Return task results with partial ticket number

Mary Beth Hutch
Tera Guru

I have successfully configured my AI Search Profile to return tickets - reference: 

AI search - Configure to search task table

My next issue is that this only seems to work if I have the FULL ticket number. I feel like I need to do something creative in the indexed source, where I am mapping the field "number" (maybe?)

Does anyone know how to proceed?

1 ACCEPTED SOLUTION

ServiceNow got back to me; unfortunately - this is a limitation

 

Issue:
The AI Search results are returned accurately if you search for the entire ticket number (INC000123456); when searching for 123456, no results are returned

Most Probable Cause:
The devs confirm this is the expected functionality.

Solution Proposed:
The way search works each "word" is indexed as a token.
This occurs on both the record/fields that are indexed and the search terms in the query.

So for example: task.number is INC000123456 becomes token [INC000123456].
When you search for 123456 you are searching for tokens that match [123456].
Broadly, that is how we index the number field on a task.

View solution in original post

8 REPLIES 8

Shamus Mulhall
ServiceNow Employee
ServiceNow Employee

Hi @Mary Beth Hutch 

 

Without making any field mapping changes you could use one of the wildcard matching operators.

 

https://docs.servicenow.com/bundle/tokyo-platform-administration/page/administer/ai-search/concept/u...

Unfortunately, that did not work. Results are empty!

Hi,

Can you clarify a few things with regard to the testing you have done.  What indexed source is this, what are your current field mappings and what are the search queries you have been testing with.  

Thank you for continuing to try to help! 

 

The indexed source is on TASK and the child tables are INCIDENT and REQUESTED ITEM

The field mappings are "map_to_raw", and the field/value is number/number - I think this is part of the problem, but this is how it is done in the video and I am unaware of any other resources.

 

When searching, if I use the entire ticket number INC00012345, the result is found; if I try any combo of a wild card and 12345, I get 0 results. AI Search Debug shows an error when I try to use a wildcard as well.  

 

When I index the tables, I do get errors in the logs that the field "number" is invalid. I am considering creating a new indexed source on TASK, and mapping the task.number field to see if the results change.