Mapping Smart Search index IDs from content IDs

Don Rea asked on February 3, 2022 23:29

Working on a Kentico 11-managed site. Among the custom data types is one representing videos. Each video is associated with one or more topics, which are maintained in a look up table with the topic name and a few bits of metadata. The videos are indexed in a SmartSearch index that includes the topics. All of this was done by a previous team to whom I no longer have access. I have inherited this site and while I am no longer a complete Kentico 11 beginner, I'm close enough.

The video page includes a dropdown mode Smart Search Filter based on topics. An example select option is <option value="topics:(;15;)">Visual</option> I'm not sure why the value is generated in that format, but it's clear enough in that the ID of the "Visual" row in the topics look up table is 15. But when I choose that option and then click the action button of the Smart Search Dialog, the URL to which I am taken has no reference to 15, but does include the query string element videostopicssmartsearchfilter=21 - and not only are the results displayed in the Smart Search Results webpart correct, they are correct if I remove all other querystring parameters and leave only that one. There is no reference to the number 21 anywhere in the "Visual" topic row, so I imagine this must be some ID that has meaning in the video Smart Search index.

My question is this: How can I find the logic that's translating the topics ID to the index ID? I really don't know what I'm looking for, or even which is the most likely codebehind to look in. But I need to be able to map some of those index IDs so I can generate preset search URLs. If push comes to shove I guess I can just search them all and get the IDs from the results URLs and create a dictionary by brute force, but that's obviously brittle in several ways. Is there anything in the Smart Search API that I can leverage to map topics to index IDs dynamically? Or something I can search for in the code to find the logic that's doing that now?

Recent Answers


languid fizzparent answered on February 25, 2022 12:26

If you delete all of the other querystring arguments and leave only that one, you'll get the following result. Because there is no mention of the number 21 elsewhere in the "Visual" subject row, you assume it must be some sort of ID that has significance in the video Smart Search index, which is correct.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.