This is a replacement for the DNN GetSearchResults Stored Procedure that we've found useful in improving search results for our clients:
CREATE procedure dbo.GetSearchResults
@PortalID int,
@Word nVarChar(100)
AS
SELECT si.SearchItemID,
sw.Word,
siw.Occurrences,
siw.Occurrences + 1000 as Relevance,
m.ModuleID,
tm.TabID,
si.Title,
si.Description,
si.Author,
si.PubDate,
si.SearchKey,
si.Guid,
si.ImageFileId,
u.FirstName + ' ' + u.LastName As AuthorName,
m.PortalId
FROM SearchWord sw
INNER JOIN SearchItemWord siw ON sw.SearchWordsID = siw.SearchWordsID
INNER JOIN SearchItem si ON siw.SearchItemID = si.SearchItemID
INNER JOIN Modules m ON si.ModuleId = m.ModuleID
LEFT OUTER JOIN TabModules tm ON si.ModuleId = tm.ModuleID
INNER JOIN Tabs t ON tm.TabID = t.TabID
LEFT OUTER JOIN Users u ON si.Author = u.UserID
WHERE (((m.StartDate Is Null) OR (GetDate() > m.StartDate)) AND ((m.EndDate Is Null) OR (GetDate() < m.EndDate)))
AND (((t.StartDate Is Null) OR (GetDate() > t.StartDate)) AND ((t.EndDate Is Null) OR (GetDate() < t.EndDate)))
--AND (sw.Word = @Word)
AND (sw.Word like '%' + @Word + '%')
AND (t.IsDeleted = 0)
AND (t.DisableLink = 0)
AND (m.IsDeleted = 0)
AND (t.PortalID = @PortalID)
OR (m.ModuleTitle like '%' + @Word + '%')
ORDER BY Relevance DESC
GO
------------------- Now, does anyone know what file I can edit to make this SP part of the DNN install?