Virtual agent : Some catalog items and record producers are not showing in the search result

jacque3
Kilo Guru

Hi Everyone,

I'm currently working on a Virtual Agent(Search Topic) in which  I have used the Script from ITSM virtual agent plugin-

sn_itsm_va.VAContextualSearchUtil().
 
I have 3 test catalogs(2 catalog items and 1 record producers) with Meta tags , short description;
find_real_file.png
Search Context I have used:
find_real_file.png
Script that I have used in testing:
var context = '6f7e3f565b30130070e4492c11f91aea';
    
var contextualSearch = new sn_itsm_va.VAContextualSearchUtil();
var response = contextualSearch.search(context, 'Severance');
var success = contextualSearch.processSearchResponse(response);
var relevantSearchResults = contextualSearch.processGeneralResults(response, 20,0);
var kbResultCount = relevantSearchResults.length;
var search_kb_json_string = JSON.stringify(relevantSearchResults);

gs.info("SEARH RESULT: " + search_kb_json_string );

I have tried searching with a keyword Severance  I have expected to have these 3 items in the results but I only got one ,which is the Separation with Severance catalog item only:

[{
	"snippet": "Separation with <B>Severance</B>",
	"image": {
		"thumbnail": {
			"link": ""
		},
		"link": ""
	},
	"related_links": [{
		"sp_link": "?id=sc_cat_item&sys_id=6ee57a0513dc360099f85566",
		"link": "com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id=6ee57a0513dc360099f85566",
		"title": "Order"
	}],
	"meta": {
		"score": 549.3299,
		"description": "",
		"interleaved": true,
		"source": "catalog"
	},
	"link": "cxs_cat_item.do?sysparm_id=6ee57a0513dc360099f85566",
	"id": "sc_cat_item:6ee57a0513dc360099f85566",
	"title": "Separation with Severance"
}]
Does anybody know how does Contextual search works? which field is being checked?
 
Thank you 
6 REPLIES 6

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Did my answer solve your question? Or do we need to follow-up on this?

Please mark this answer as correct if it solves your problem. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hi Mark, 

I have used your solution in the other problem I had thank you for that, but seems like my problem is from the contextual result itself. It's not querying the record producers data.

 

Thank you