Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Knowledge Articles searches need to only return the most current published version

siddharthjain09
Tera Contributor

Hi,

 

I want that when performing a global search, it should displays only the most recent published version of each Knowledge Article that matches search criteria.

 

Please do let me if you guys have any solution for this problem statement.

 

Regards,

Siddharth

1 ACCEPTED SOLUTION

sivasankaris
Tera Guru

Hi @siddharthjain09 ,

In ServiceNow, how Global Search works depends on the UI you’re using:

Next Experience UI → uses Search Sources

Core UI / UI15 → uses Search Groups

Since your requirement is to show only the latest published version of Knowledge Articles, you need to configure the Knowledge search source (Next Experience) or search group (Core UI) accordingly.

 

Next Experience UI
In Next Experience, Global Search is controlled by Search Sources.
A Search Source defines which table is searchable and what conditions should apply.

Navigation:

  • All → System Definition → Search Sources
  • Open the search source: Knowledge & Catalog – Knowledge, Open table: kb_knowledge
  • In the Conditions field, add:latest = true AND workflow_state = published

Verify it is linked to Global Search
Navigation:

  • All → AI Search → Search Experience → Search Applications
  • Open: Now Experience Search Configuration
  • Check Application Search Sources related list
  • Make sure Knowledge source is present

for Core UI / UI15
Here Global Search uses Search Groups.

Navigation: 

  • All → System Definition → Search Groups
  • Open: Knowledge & Catalog, Open Text Search Tables related list, Open table: kb_knowledge
  • Add condition: latest = true AND workflow_state = published

Refer the below article for this

https://www.servicenow.com/docs/bundle/zurich-platform-administration/page/administer/search-adminis...

 

 

If Changes are not visible, rebuild the index

Next we have to rebuild the index to reflect our changes

Steps to Reindex (Full Table Index)
Navigation:

  • All → AI Search → AI Search Index → Indexed Sources
  • Open Indexed Sources  → Select the source(s) you want to reindex
    (You’ll see an alert icon if records are not indexed)
  • Click: Actions on selected rows…, Select: Index All Tables
  • System will queue an indexing job, Open the record to monitor status: Ingestion State = Indexed → completed

How to monitor progress

  • Open the indexed source
  • Go to Indexed Source History
  • Refresh page, Check: Status, Start time, Completion

Refer the below article for indexing

https://www.servicenow.com/docs/bundle/washingtondc-platform-administration/page/administer/ai-searc...

 

If this is useful, Please Mark it as helpful and Please Accept My Solution...

 

Best Regards

SIVASANKARI S

View solution in original post

5 REPLIES 5

yashkamde
Giga Sage

 

*Use kb_knowledge table (not kb_knowledge_version)

Global Search should always index kb_knowledge, because:

  • It stores only the latest published version

  • Older versions live in kb_knowledge_version

1)

  • Go to System Definition → Tables

  • Open kb_knowledge

  • Ensure Search enabled = true


2)Enforce Query Filter (If duplicates still appear)

Add this condition in the Search Source condition:

workflow_state = published

If available in your instance, also ensure:

latest = true

 
If you find this helpul plz mark as helpful..