Contextual Search -- Limiting search to specified knowledge bases or catalogs?

onthego
Giga Contributor

I've been working with contextual search in Fuji.   I feel like I'm missing something here in that there is no apparent configuration for what knowledge bases or catalogs the search can be limited toward.   It sniffs of "one size fits all" in a release where we now have multiple defined catalogs and knowledge bases.

My use case is having a wizard for the purpose of front ending a software how-to and/or request that allows the user to search for keywords in knowledge base articles and descriptions of catalog items associated with software requests (i.e. the software product catalog).   I need to limit the search toward software alone.

Has anyone else worked with limiting the search boundaries?

1 ACCEPTED SOLUTION

chrishenson
ServiceNow Employee
ServiceNow Employee

Hello Allan,



Just a quick intro, I'm one of the developers from UK Application Development which created Contextual Search.



Limiting the Service Catalog or Knowledge Base is configured in the Search Context.   I'd recommend creating a new search context which uses the Knowledge and Catalog searcher.   Once the context is created a set of Resource Configurations will be available to you.



Expand the catalog resource configuration you'll see the Catalog Name property.   Enter the name of the catalog you wish to limit the search to here.



Expanding the knowledge resource configuration a Condition property is made available to you.   You can restrict the Knowledge base you wish to search there using an encoded query E.g. kb_knowledge_base=ffcdf061ff2121009b20ffffffffffa4 for the 'out of box' HR catalog.



We're looking at providing a standard set of properties for search resources to make configuration more consistent.



Regards,



Chris Henson


View solution in original post

17 REPLIES 17

Hi All,



Does this at all work in Fuji?   Do I need to enable any property?



So is there anyway I can narrow down to a specific category?



btw:   That knowledge-base sys-id works like a charm, it would be nicer if we can get something similar for Catalog also. like 'sc_category=3de1a1dbdb416a009b50fb4ffe961901'?


Hello Andy,



Yes this does all work in Fuji.   You can configure this via Search Context > Resource Properties.



Details can be found here: Defining Contextual Searches - ServiceNow Wiki



Regards,



Chris


Hi Chris ,



Just wanted to know your thoughts on a question already asked in this thread.



Is possible to reference the current fields in the condition property?


For example: Incident and Knowledge Form have an field "Category" and the only knowledge articles who are linked to the same Category as the Incident shall be displayed in search results.



Any suggestions would be appreciated .



Thanks in advance.


Chetan


Hi Chris,



I'd like also to know your thoughts on a question already asked twice in this thread: Is it possible to reference the current fields in the condition property? I have a similar requirement as Chetan Sondhi in above post couple of weeks ago.



Thanks


Jiri


Hello Jiri, Chetan,



Apologies for missing these posts.   Answer is below if you you still need help with this.



The ability to filters using live record producer or form values was added in Jakarta.   If you navigate to a Table or Record Producer configuration there is a new related list called filter conditions.   You'll be able to create one of these for each resource which is part of the Context in use for that table or record producer.



Once the Filter Configuration has been added you'll be able to either script a filter or add defined filter conditions, compare field values or display values etc.



I'd add one thing to keep an eye on.   These filters are run for each search and can be called multiple times.   If you're using scripted filters and are perform anything   complex it could impact search performance.



Regards,



C