Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Smart Search - Content missing View modes: 
User avatar
Member
Member
zevinganez - 9/16/2011 12:55:39 PM
   
Smart Search - Content missing
Hi all,

I'm not able to see the content 'part' in the list result when searching my site.

I've activated the smart search on my site and i'm using the smart search box web part and the smart search dialog with results web part.

The Lucene engine is indexing my content correctly.

I have document types that do not contain any fields. So the Content will not appear.
Transformation code:
<div style="margin-top: 5px; width: 590px;">
<%# SearchHighlight(HTMLHelper.HTMLEncode(TextHelper.LimitLength(HttpUtility.HtmlDecode(HTMLHelper.StripTags(CMS.ExtendedControls.ControlsHelper.RemoveDynamicControls(GetSearchedContent(DataHelper.GetNotEmpty(Eval("Content"), ""))), false, " ")), 280, "...")),"<span style=\"background-color: #FEFF8F\">","</span>") %><br />
</div>

I have a lot of widgets in some templates that are being searched by Lucene, but I do not have the "Content" part. How to I get the DocumentContent or something like that to be able to show a resume of the content indexed. All my widgets are RTE (Rich Text Editor).

Can anyone tell me each columns or other should I look into to show a resume of the searched text.

Thank you.

User avatar
Member
Member
theplastictoy - 9/20/2011 5:20:21 AM
   
RE:Smart Search - Content missing
Hi all,

Here's an update on this:

The search results page shows something like this for each entry:

<content><webpart id="contactformtext;b6f20475-b925-4a4e-8b5d-e0635592b044"><![CDATA[<div><span style="color: rgb(255, 102, 0);"><span style="font-size: small;"><span style="font-family: 'Trebuchet MS';"><br /> <strong><span style="color: rgb(0, 0, 0);"><span style="font-size...

Is there a method to extract only the content of the CDATA element?

Thanks

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 9/20/2011 8:22:07 AM
   
RE:Smart Search - Content missing
Hi,

do you have a document (for example page menu document) with no content fields, but you have a several editable text widgets on the template? In this case you could select a DocumentContent column in the Content field in the Site Manager - Development - <document_type> - Search fields - Content field: DocumentContent. This should contain the text of editable text web parts/widgets and the result should be displayed correctly. Please do not forget to rebuild index.

Best regards,
Ivana Tomanickova

User avatar
Member
Member
theplastictoy - 9/23/2011 7:16:46 AM
   
RE:Smart Search - Content missing
Yes, we have a custom document type for these documents, and we have set DocumentContent for Content Field.

The search results are correct, so it's searching in the right content. (Well, actually, if I search for "webpart", it shows all documents).
The problem is the way it's displayed: it shows something like "<webpart...." instead of just the text content inside the editable text widgets.

Please note that we're using custom webparts with HTML fields and not the standard Kentico webparts.

Thanks,
Ricardo

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 9/26/2011 6:16:14 AM
   
RE:Smart Search - Content missing
Hi,

could you please share the code of your custom web part?
The result which is displayed seems to come from the DocumentContent field (CMS_Document table). It is probably not processed correctly, but without the code I am not able to tell you more.

Best regards,
Ivana Tomanickova