
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2019 08:50 AM
I'm customising the search facets for knowledge and have successfully added in a couple of custom fields, this is working fine, with one exception. Any foreign language article values are not showing up in the search fact, even though the translated article is returned in the search results, and the search multiple languages property is set.
So for example, if I have the following articles;
Article title | Language | Applicable Country | Category |
This is a sample English article | en | UK, USA, Australia | English Category |
This is a sample French article | fr | France, Canada | French Category |
If I search for 'sample' I get both articles returned, but the search facet will only show 'UK, USA,Australia' as options in the country, and English Category as a category. I would expect to see 'UK, USA, Australia, France, Canada'.
Clearly the search source is not seeing the same results as the actual search.
Solved! Go to Solution.
- Labels:
-
Knowledge Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2019 12:10 PM
The answer lies in the call to "KBPortalServiceImpl().getAllFacets" in the facet script. The second parameter holds the language ('en' by default), so changing it to 'en,fr' brings back all the results as expected.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2019 12:10 PM
The answer lies in the call to "KBPortalServiceImpl().getAllFacets" in the facet script. The second parameter holds the language ('en' by default), so changing it to 'en,fr' brings back all the results as expected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2020 01:28 PM
Hi Aidan, thanks for posting the solution to the issue you had.I have made the same change in my code but unfortunately still can't get it working. I am trying to do the same thing as you and add the language as an option in the Knowledge search source. I have made changes to the Facet generation script that I think are required but I am obviously missing something!
Would you be able to post the code you used for this so I can try and figure out where I am going wrong please?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2020 02:16 AM
Hi Aidan, just to let you know I have just figured this out and it was not the Facet generation script causing my problem, it was the Data fetch script. I just needed to amend the code where it sets up the request variable (line 24) from:
language : "",
to
language : facets.language,
Thanks again for posting the solution to the issue you were having as this has saved me some time!
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2020 10:48 AM
Hello Steve,
can you please help me on this, we have enabled multi language support in portal and i want to modify the search source to return knowledge articles irrespective of language selected in the portal
if my language setting is french i should be able to view the knowledge articles in english as well.
i posted the question in community as well but no luck so far( https://community.servicenow.com/community?id=community_question&sys_id=ba86b9be1be2d414305fea89bd4b...)
any suggestions will be very helpful to me
Thanks and Regards,
Prerana