Knowledge Base - How to remove attachments from search results

Sandy7
Tera Expert

Hello,

In our knowledge base, we have several articles that have attachments. Currently, when someone searches the knowledge base and the articles have attachments, the contents from the attachments are returned in the search results making a lot of the results irrelevant. 

Is there any way I can exclude attachments from search results?

 

Thanks!

6 REPLIES 6

Rajesh Kannan G
ServiceNow Employee
ServiceNow Employee

By default article attachments are indexed and any search term found in attachment returns the article in the search result.

If you are asking for a way to turn off searching attachments then yes you can disable indexing attachments by Removing the attribute "Attachment Index", Below documentation show how to enable it you can disable it by removing the attribute or changing the value to false.

https://docs.servicenow.com/bundle/orlando-platform-administration/page/administer/form-administrati...

Mark as Correct Answer & Helpful if this solves your issue or Helpful if this is useful to you.

Regards,

Rajesh

Barry_W
Mega Guru

Hi Rajesh - thanks very much for the information.

I've disabled the attribute (changed the value to false), but when searching via our portal, or within the contextual search of a case the articles with attachments are still being returned at the top of the results. Is there a procedure to once you've disabled the attribute?

Rajesh Kannan G
ServiceNow Employee
ServiceNow Employee

Did you regenerate text index of the knowledge table. Usually it takes some time for the index generation to complete depending on the article of the table. Find the event in System Policy > Events > Event Log with Name "text_index.all" and Parm1 "kb_knowledge" verify the event processing is complete before testing again. 

find_real_file.png

Regards,

Rajesh

Barry_W
Mega Guru

Yes, selected the option to Generate text index, after the change, and it seems to have completed as expected.

Tried creating a new article, with attachment. Ran a search and it pulled results from the attachment again.

Not sure what I have missed but i'm still getting undesirable results from the internal knowledge homepage and the portal.

find_real_file.png