ASPX templates
Version 5.x > ASPX templates > Smart search not returning results View modes: 
User avatar
Member
Member
ryans-tushaus - 3/22/2011 1:21:59 PM
   
Smart search not returning results
I'm using version 5.5R2. My indexes are being built but the SearchDialogWithResults webpart is not returning any results. I'm setting the following property:

Indexes="BDCHASPX.IndexDocument"

The correct format is site code name.index code name, right?

Are any other properties required?

Thanks,
Ryan

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 3/22/2011 3:03:29 PM
   
RE:Smart search not returning results
Hi,

here is an example code:


<%@ Register Src="~/CMSWebParts/SmartSearch/searchdialogwithresults.ascx" TagName="searchdialogwithresults" TagPrefix="cms" %>

<uc5:cmscompletesearchdialog ID="Cmscompletesearchdialog1" Indexes="CorporateSiteASPX.default;" runat="server" TransformationName="CMS.Root.SmartSearchResults" NoResultsText="No results were found." SearchScopeLabel="Search scope:" EnableViewState="false" />


If the example will not help you, could you please show us your code (aspx template code, transformation code)?

Best regards,
Ivana Tomanickova

User avatar
Member
Member
ryans-tushaus - 3/22/2011 4:03:05 PM
   
RE:Smart search not returning results
Thanks for the example. I tried your code except that I substituted my site name and index name for the index property. I still get no results. I'm trying to keep it as simple as possible until I get a working. My original code is as follows:


<%@ Register src="../../CMSWebParts/SmartSearch/SearchDialogWithResults.ascx" tagname="SearchDialogWithResults" tagprefix="uc1" %>
<uc1:SearchDialogWithResults ID="SearchDialogWithResults1" runat="server" TransformationName="CMS.Root.SmartSearchResults" Indexes="BDCHASPX.IndexDocument" EnableViewState="false" />

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 3/23/2011 5:31:19 AM
   
RE:Smart search not returning results
Hi,

could you please try to add a parameter NoResultsText="No results were found." to see if the webpart returns something. Because your setting seems to be correct.

Could you please double check if the BDCHASPX.IndexDocument is a code name of your index (Site Manager - Administration - Smart Search - your index - General tab - Code name)?

For testing purposes you could try to replace your index with some default - for example CorporateSite.Default and search for word nokia.

You could check if search fields are selected correctly:
http://devnet.kentico.com/docs/devguide/smart_search_object_settings.htm

Best regards,
Ivana Tomanickova

User avatar
Member
Member
ryans-tushaus - 3/23/2011 6:49:54 AM
   
RE:Smart search not returning results
Hi,

Thank you! Your suggestion to double check my index code name helped me indirectly solve the problem. I had been setting the indexes property of the search control to BDCHASPX.IndexDocument when I should have just been setting it to the actual index code name of IndexDocument. The examples that I had looked at misled me to believe that I needed to prefix my index code name with the code name for the site when setting the search control indexes property since the index names in the examples were similar to your example of CorporateSite.Default. Apparently, it must just be common practice to use the site name in the index code name itself.

Ryan