AI Search – Incident Attachments Not Searchable in Global Search
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9 hours ago
Hello All,
I have a requirement where users should be able to search for an Incident or any other table through Global Search using the attachment filename or content.
For example:
Incident: INC000321
Attachment: XYZ.pdf
Content inside the attachment: Test
The expected behavior is that searching for either XYZ.pdf or Test in Global Search should return the related Incident or other suggestion related to attachment.
I Check an AI Search Indexed Source for incident and set:
index_attachments = true
Indexed Source is Active
Snow document : https://www.servicenow.com/docs/r/platform-administration/ai-search/enable-attachment-indexing-ais.h...
Has anyone configured attachment indexing for the Incident table or any other table successfully?
Is any additional configuration required apart from index_attachments = true?
Is there any configuration required ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
8 hours ago
Yes, index_attachments = true is only one link in the chain. Quick checklist in debug order.
1. Confirm the engine. Zing uses attachment_index=true on sys_dictionary. AI Search uses index_attachments on the ais_datasource record. Different engines, and if Global Search is still on Zing your attribute is inert. Switch it via AI Search > AI Search for Next Experience > Guided Setup, task "Activate AI Search for all Next Experience search applications". Next Experience only, not supported on Core UI.
2. Reindex. Changing the attribute does not pull in attachments that already exist.
3. Read the history. On the ais_datasource record, open the Indexed Table Histories related list. It shows records and attachments processed with warnings and errors. If XYZ.pdf was skipped, the reason is there.
4. Check the file. No OCR, so a scanned PDF indexes the filename and never the content. Best practice is under 5MB and roughly 10,000 words.
var att = new GlideRecord('sys_attachment');
att.addQuery('table_name', 'incident');
att.addQuery('file_name', 'XYZ.pdf');
att.query();
while (att.next())
gs.info(att.getValue('content_type') + ' | ' + att.getValue('size_bytes'));
Quickest isolation test: attach a plain .txt containing Test, reindex, search Test. Works with txt but not pdf means your config is fine and the file is the problem.
5. Indexing is not delivery. Indexed Source, then Search Source, then Search Profile, then the Search Application behind Global Search. If the Search Source is not on that profile, the index is full and search returns nothing with no error anywhere.
6. ACLs trim against the parent record, so impersonate a real user rather than testing as admin.
Split your testing: search XYZ.pdf for the filename path and Test for the content path. Filename works but content does not means step 4. Neither works means 1, 3 or 5.
Your expected behaviour is correct, content indexes against the parent so a hit returns INC000321.
Share the Indexed Table Histories output and the content_type and it should narrow to one step.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hello @rajshinde999910 ,
Refer the link for detail steps :
The results will be something like this :
When attach an attachment into the record..
you can get that record from the content of that attachment..
If my response helped mark as helpful and accept the solution.