Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > GetSearchValue of smart Search custom index View modes: 
User avatar
Certified Developer 8
Certified Developer 8
majoor-evident - 3/15/2013 3:37:23 AM
   
GetSearchValue of smart Search custom index
Hello,

I've created a custom smart search index as described here. I added several fields to the search document by using the SearchHelper.AddField(doc, "MyName", "MyValue", true, false) function.

How do I show these fields in the transformation of the Smart Search Results webpart?
<%#GetSearchValue("MyName")%>
doesn't seem to work. Do I need to define the field names somewhere?

Regards,
Martijn

User avatar
Certified Developer 8
Certified Developer 8
majoor-evident - 3/18/2013 5:03:37 AM
   
RE:GetSearchValue of smart Search custom index
I suppose I should just create a custom webpart then, using the SearchHelper.Search() method.

Too bad I can't use GetSearchValue(), would seem like the preferred option to me.

User avatar
Kentico Support
Kentico Support
kentico_filipl - 3/18/2013 8:06:11 AM
   
RE:GetSearchValue of smart Search custom index
Hello Martijn,

the
<%#GetSearchValue(string ColumnName)%>
function should work in transformations. Please make sure you really have the columns which you want to display in search results indexed. You can use a third-party tool for it, you can download it here - Lucene.

Best regards,
Filip Ligac


User avatar
Certified Developer 8
Certified Developer 8
majoor-evident - 3/18/2013 8:50:37 AM
   
RE:GetSearchValue of smart Search custom index
Thanks for pointing out the tool! :) Using it, I see that the custom fields are indexed.

When i use Eval("title") in my transformation, I am able to retreive the value from SearchHelper.CUSTOM_TITLE. Eval("MyValue") however returns nothing. (GetSearchValue does not return anything either)

Is it possible I need to define a different document type in the SearchHelper.CreateDocument() method? The type of document I provided is SearchHelper.CUSTOM_SEARCH_INDEX. Should this be a regular className? (sitemanager > development > document types)

Regards,
Martijn

User avatar
Kentico Support
Kentico Support
kentico_filipl - 3/19/2013 6:21:50 AM
   
RE:GetSearchValue of smart Search custom index
Hello Martijn,

Regrettably, our developers told me that this functionality is only implemented in Kentico CMS version 7 so if you really need to use it, I would advice you to upgrade.

Best regards,
Filip Ligac