搜索问题之三:SiteFactory3.6多个一级软件节点的软件无法全部搜索出来
问题:多个一级软件节点,无法搜索出所有软件栏目的内容?
解决方法:
第一步:修改“软件栏目内搜索”标签的查询语句,如下:
SELECT NodeID,arrChildID FROM PE_Nodes WHERE NodeId = @parentId
改为:
SELECT NodeID,arrChildID FROM PE_Nodes WHERE parentId in (@parentId)
第二步:修改“文章栏目内搜索”标签内容,如下,去掉红色部分代码:
没有任何相关搜索结果!
{PE.Label id="软件栏目内搜索_" titleLength="" contentLength="" linkOpenType="" fieldValue="" queryCond="SELECT TOP @pagesize *
FROM PE_CommonModel CM INNER JOIN PE_U_Soft UT ON (CM.ItemID = UT.ID)
WHERE CM.NodeID IN () AND CM.Status = 99
AND CM.Title LIKE '%%'
AND UT.SoftIntro LIKE '%%'
AND UT.Author LIKE '%%'
AND CM.Inputer LIKE '%%'
AND UT.Keyword LIKE '%%'
AND CM.GeneralID NOT IN (
SELECT TOP @startrow ICM.GeneralID
FROM PE_CommonModel ICM INNER JOIN PE_U_Soft IUT ON ICM.ItemID = IUT.ID
WHERE ICM.NodeID IN () AND ICM.Status = 99
AND ICM.Title LIKE '%%'
AND IUT.SoftIntro LIKE '%%'
AND IUT.Author LIKE '%%'
AND ICM.Inputer LIKE '%%'
AND IUT.Keyword LIKE '%%'
ORDER BY ICM.UpdateTime)
ORDER BY CM.UpdateTime" queryCount="SELECT COUNT (ICM.GeneralID)
FROM PE_CommonModel ICM INNER JOIN PE_U_Soft IUT ON ICM.ItemID = IUT.ID
WHERE ICM.NodeID IN () AND ICM.Status = 99
AND ICM.Title LIKE '%%'
AND IUT.SoftIntro LIKE '%%'
AND IUT.Author LIKE '%%'
AND ICM.Inputer LIKE '%%'
AND IUT.Keyword LIKE '%%'
" page="true" pagesize="" urlpage="true" /}
第三步:修改“网站顶部”标签,相应nodeId值改为指向全站,如下:
switch (modelId) {
case 1:
location.href = '{PE.SiteConfig.ApplicationPath/}search.aspx?searchtype=1&modelId=' + modelId + '&nodeId=1&fieldOption=title&Keyword=' + searchValue;
break;
case 2:
location.href = '{PE.SiteConfig.ApplicationPath/}search.aspx?searchType=1&modelId=' + modelId + '&nodeId=2&fieldOption=title&Keyword=' + searchValue;
break;
default:
location.href = '{PE.SiteConfig.ApplicationPath/}search.aspx?searchtype=1&modelId=' + modelId + '&nodeId=3&fieldOption=title&Keyword=' + searchValue;
break;
}
改为:
switch (modelId) {
case 1:
location.href = '{PE.SiteConfig.ApplicationPath/}search.aspx?searchtype=1&modelId=' + modelId + '&nodeId=1&fieldOption=title&Keyword=' + searchValue;
break;
case 2:
location.href = '{PE.SiteConfig.ApplicationPath/}search.aspx?searchType=1&modelId=' + modelId + '&nodeId=2&fieldOption=title&Keyword=' + searchValue;
break;
default:
location.href = '{PE.SiteConfig.ApplicationPath/}search.aspx?searchtype=1&modelId=' + modelId + '&nodeId=0&fieldOption=title&Keyword=' + searchValue;
break;
}