Smart search returns null for external project

Peter Otmar asked on February 16, 2018 18:28


I'm working on an external web api project. The project is using smart search api, however the result is always null.

SearchIndexInfo object is found but for example NumberOfIndexedItems is 0.

The Kentico server is on different computer to my development machine. When I try the same code on a local installation of Kentico, the search works.

From the documentation I understand that WebApplicationPhysicalPath has to be specified for smart search. Does that mean that an external project needs to be on the physical machine to be able to access the Kentico physical path? Am I missing something?

Bellow are the details in global.asax

void Application_Start(object sender, EventArgs e)
    CMS.Base.SystemContext.WebApplicationPhysicalPath ="C:\\inetpub\\wwwroot\\Kentico10\\CMS";

void Application_BeginRequest(object sender, EventArgs e)

Thanks for any help with this issue.


Correct Answer

Michal Samuhel answered on February 16, 2018 19:02

Hi Peter,

Does the external project have access to index files? SearchIndexInfo is a DB based object that contains configuration for the index, but actual index binaries which are used to search are in App_Data\CMSModules\SmartSearch{IndexName} folder. These have to accessible. For MVC applications, which are external projects as well, we are actually using web farms to move indexes in application memory.

In your situation, you can check whether your application can actually access above mentioned folder on main server and that the path is mapped correctly for this server.

0 votesVote for this answer Unmark Correct answer

Recent Answers

Peter Otmar answered on February 17, 2018 09:22

Thanks Michal

The mapping to actual folder will fix it. I am curious how did you solve this problem using web farms to move indexes in application memory? Can you please explain?

Thanks Peter

0 votesVote for this answer Mark as a Correct answer

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