How to exclude certain articles from Knowledge search results for certain users?

qz8437
Mega Contributor

I want to exclude a subset of articles from appearing in the results for my Service Desk team, based on the value of a custom field.   We have a Document Type field that identifies whether it is intended for First Level Support Second Level Support, etc.   I don't want the First Level Support users to be slowed down by seeing Second Level Support documents in their search results.   These folks can be identified by either group membership or Role, whichever works.   What's the best way to accomplish this?

1 ACCEPTED SOLUTION

jeremy_gardner
Tera Expert

Thinking out loud (which gets dangerous)...



When you look at a list of records or enter something in search, a query string is passed server side to return your list of results.   I'm thinking that query string would look different when coming through Search than looking at list of kb_knowledge record list directly.  



If it is, what if you setup a query BR that looks at contents of current.getEncodedQuery(), and based on the search string and current user's role (or lack of a role or group), add a query to remove 2nd level documents:



    current.addQuery('document_tier', '!=', '2nd level');


View solution in original post

8 REPLIES 8

Bryan Campbell
Giga Expert

Are you looking to omit these items from first level support just in the search but they can still access the documents if they need to?



We manage ours based on Role but this prevents those NOT listed in the Selected field from seeing the article completely.   If Selected is left blank the article is available to everyone but once a Role is added only those with that role can see the article.



find_real_file.png


Thanks Bryan for the reply.



We'd like to only omit them from search results, but not make them completely inaccessible.   Also, the role method does the opposite of what we want - it is the absence of the helpdesk role that we'd want to give access.


Bryan Campbell
Giga Expert

That's a interesting one.   I'm curious to see how this would be done.


Uncle Rob
Kilo Patron

I wonder if this might be a use case for Fuji's distinct Knowledge Bases.   Ie. you have a 1st level support KB, and a second level support KB.



Ideally the relationships between articles and KB's would be m-to-m so the same article could exist in both places, but currently its only 1toM